2 ms·
Apparently, JavaScript has to be running in order for that colour selection to work properly. Is that not what `prefers-color-scheme` in CSS is for?
by zahlman 1y ago
Apparently, JavaScript has to be running in order for that colour selection to work properly. Is that not what `prefers-color-scheme` in CSS is for?
- webstrand 1y agoYeah, it is. And the website actually uses `prefers-color-scheme` too. It looks like this is a bug. The website sets `[data-theme="dark"]` via javascript on page-load so that its light/dark toggle button works, and its stylesheets duplicate every style from `prefers-color-scheme` to `[data-theme="dark"]`. The duplication messed up `--astro-code-bg` and copied from the light scheme.