diff options
| author | Fuwn <[email protected]> | 2026-01-20 00:27:51 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-20 00:27:51 -0800 |
| commit | 3ab10150dbfaeb7ad5c84f8ffe2cd7ba080addea (patch) | |
| tree | e68718c4735cc0de405729807c9b9dd1f9d82b01 /internal/theme | |
| parent | refactor: Use CSS variable overrides for proper theme integration (diff) | |
| download | kaze-3ab10150dbfaeb7ad5c84f8ffe2cd7ba080addea.tar.xz kaze-3ab10150dbfaeb7ad5c84f8ffe2cd7ba080addea.zip | |
fix: Use consistent CSS selectors for theme variable overrides
Match the same selectors used in GenerateCSS():
- Light mode: :root, :root.light
- Dark mode: :root.dark
This ensures the override specificity matches the theme variable definitions.
Diffstat (limited to 'internal/theme')
| -rw-r--r-- | internal/theme/theme.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/theme/theme.go b/internal/theme/theme.go index ed10f80..9e3d30b 100644 --- a/internal/theme/theme.go +++ b/internal/theme/theme.go @@ -193,7 +193,8 @@ func (t *ResolvedTheme) GenerateVariableOverrides() string { return ` /* OpenCode Theme - Override Kaze CSS Variables */ -:root, :root:not(.dark) { +/* Light mode - uses theme's light colors */ +:root, :root.light { /* Background colors */ --bg-primary: var(--theme-background); --bg-secondary: var(--theme-background-panel); @@ -215,7 +216,8 @@ func (t *ResolvedTheme) GenerateVariableOverrides() string { --status-unknown: var(--theme-text-muted); } -.dark { +/* Dark mode - uses theme's dark colors */ +:root.dark { /* Background colors */ --bg-primary: var(--theme-background); --bg-secondary: var(--theme-background-panel); |