Tell the browser your theme so scrollbars, pickers and menus match.
From web-design-guidelines (Web Interface Guidelines).
Compare scrollbar, date picker and fields in each theme.
/* nothing: browser default is light */color-scheme: dark:root { color-scheme: light dark; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
Flip the page theme, then type a color on the left.
<meta name="theme-color" content="#ffffff">content="#0a0a0a" (dark)<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0a0a0a" media="(prefers-color-scheme: dark)">
const bg = getComputedStyle(document.body).backgroundColor;
document.querySelector('meta[name="theme-color"]').setAttribute("content", bg);
Open both menus and find Net 45.
background: transparent; color: inherit;background-color: var(--bg); color: var(--fg);select {
background-color: var(--bg);
color: var(--fg);
}
Native scrollbars, pickers and toolbars ignore CSS; these two hints reach them.
theme-color support varies; desktop Firefox ignores it.