Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions windows/tauri/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>Lithe</title>
<script type="module">
import { ensureStartupAppearanceApplied } from "/src/features/settings/lib/appearance-bootstrap.ts";
Expand Down
3 changes: 3 additions & 0 deletions windows/tauri/src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
}

#root {
color: var(--foreground);
background: transparent;
overscroll-behavior: none;
}

html {
color: var(--foreground);
scroll-behavior: smooth;
overflow: hidden;
overscroll-behavior: none !important;
Expand All @@ -20,6 +22,7 @@ html {
body {
margin: 0;
padding: 0;
color: var(--foreground);
font-size: var(--ui-text-base);
overflow: hidden;
overscroll-behavior: none !important;
Expand Down
48 changes: 23 additions & 25 deletions windows/tauri/src/styles/rendered-code-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,29 @@
padding: 0 1px;
}

@media (prefers-color-scheme: dark) {
.token.erb-tag {
background: rgba(139, 69, 19, 0.2);
}

.token.erb-delimiter {
color: #ff7b72;
}

.token.erb-output-delimiter {
color: #7ee787;
}

.token.erb-comment-delimiter {
color: #8b949e;
}

.token.erb-scriptlet-delimiter {
color: #d2a8ff;
}

.token.erb-output,
.token.erb-scriptlet {
background: rgba(139, 69, 19, 0.1);
}
[data-theme-type="dark"] .token.erb-tag {
background: rgba(139, 69, 19, 0.2);
}

[data-theme-type="dark"] .token.erb-delimiter {
color: #ff7b72;
}

[data-theme-type="dark"] .token.erb-output-delimiter {
color: #7ee787;
}

[data-theme-type="dark"] .token.erb-comment-delimiter {
color: #8b949e;
}

[data-theme-type="dark"] .token.erb-scriptlet-delimiter {
color: #d2a8ff;
}

[data-theme-type="dark"] .token.erb-output,
[data-theme-type="dark"] .token.erb-scriptlet {
background: rgba(139, 69, 19, 0.1);
}

.token.erb-output,
Expand Down
2 changes: 1 addition & 1 deletion windows/tauri/src/styles/scrollbars.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
--app-scrollbar-thumb-border: 3px solid transparent;
}

.dark {
[data-theme-type="dark"] {
--app-scrollbar-thumb: rgba(166, 166, 166, 0.38);
--app-scrollbar-thumb-subtle: rgba(166, 166, 166, 0.24);
--app-scrollbar-thumb-hover: rgba(188, 188, 188, 0.58);
Expand Down
23 changes: 23 additions & 0 deletions windows/tauri/src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
--color-selected: var(--selected);
--color-selection: var(--selection);

--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-accent-foreground: var(--accent-foreground);
--color-muted: var(--muted);
--color-input: var(--input);
--color-ring: var(--ring);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-primary-foreground: var(--primary-foreground);
--color-secondary-foreground: var(--secondary-foreground);

--color-tab-bar: var(--tab-bar-bg);
--color-tab-active: var(--tab-active-bg);
--color-tab-hover: var(--tab-hover-bg);
Expand Down Expand Up @@ -91,6 +102,7 @@

@layer base {
:root {
color-scheme: light;
--app-font-family:
"Geist Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
Expand Down Expand Up @@ -126,6 +138,16 @@
--app-ease-in-out: cubic-bezier(0.66, 0, 0.34, 1);
--app-press-scale: 1;
--border-strong: color-mix(in srgb, var(--border) 72%, var(--foreground) 28%);
--popover: var(--surface);
--popover-foreground: var(--foreground);
--accent-foreground: var(--foreground);
--muted: var(--surface);
--input: var(--border);
--ring: var(--border-strong);
--card: var(--surface);
--card-foreground: var(--foreground);
--primary-foreground: var(--background);
--secondary-foreground: var(--foreground);
--success: var(--primary);
--warning: var(--muted-foreground);
--tab-bar-bg: color-mix(in srgb, var(--surface) 72%, var(--background));
Expand Down Expand Up @@ -176,6 +198,7 @@
}

:root[data-theme-type="dark"] {
color-scheme: dark;
--shadow-card:
0 1px 2px rgb(0 0 0 / 0.24), 0 2px 4px rgb(0 0 0 / 0.18), 0 0 0 0.5px rgb(255 255 255 / 0.1);
--shadow-popover:
Expand Down
2 changes: 1 addition & 1 deletion windows/tauri/src/ui/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { TooltipValueType } from "recharts";
import { cn } from "@/utils/cn";

// Format: { THEME_NAME: CSS_SELECTOR }
const THEMES = { light: "", dark: ".dark" } as const;
const THEMES = { light: "", dark: '[data-theme-type="dark"]' } as const;

const INITIAL_DIMENSION = { width: 320, height: 200 } as const;
type TooltipNameType = number | string;
Expand Down
Loading