fix: adapt color-theme attribute on root based on theme

This commit is contained in:
Felix Roos 2026-01-20 00:59:43 +01:00
parent de83805fd9
commit afac1f62ca
No known key found for this signature in database
4 changed files with 4 additions and 0 deletions

View file

@ -198,6 +198,7 @@ export function activateTheme(name) {
const themeSettings = settings[name] || settings.strudelTheme;
// set css variables
themeStyle.innerHTML = `:root {
color-scheme: ${themeSettings.light ? 'light' : 'dark'};
${Object.entries(themeSettings)
// important to override fallback
.map(([key, value]) => `--${key}: ${value} !important;`)

View file

@ -25,6 +25,7 @@ export const settings = {
gutterForeground: lightGrey,
gutterBorder: 'transparent',
lineHighlight: pinkAccent,
light: true,
};
export default createTheme({