Theme browser scrollbar

Hint current color-scheme to the browser. This enables chromium-based
browsers to change the scrollbar color according to the current theme.
This commit is contained in:
Alexandre Iooss 2022-12-26 22:57:04 +01:00
parent 37d1939dc0
commit 1fa9f27619
3 changed files with 16 additions and 0 deletions

View File

@ -26,6 +26,9 @@
--highlighted: #333; --highlighted: #333;
--visited: #aaa; --visited: #aaa;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.5); --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
/* Hint color theme to browser for scrollbar */
color-scheme: dark;
} }
/* Browser-defined light theme */ /* Browser-defined light theme */
@ -42,6 +45,9 @@
--highlighted: white; --highlighted: white;
--visited: #555; --visited: #555;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.1); --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
/* Hint color theme to browser for scrollbar */
color-scheme: light;
} }
} }

View File

@ -11,3 +11,8 @@
--highlighted: #fbf1c7; --highlighted: #fbf1c7;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.25); --shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
} }
html:has(> .gruvboxlight) {
/* Hint color theme to browser for scrollbar */
color-scheme: light;
}

View File

@ -12,3 +12,8 @@
--visited: #555; --visited: #555;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.1); --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
} }
html:has(> .light) {
/* Hint color theme to browser for scrollbar */
color-scheme: light;
}