15 ms·
I feel like a page trying to teach something about new CSS features should not be showing me code spans (in dark mode) with the colour combination of rgb(236, 2
by zahlman 1y ago
I feel like a page trying to teach something about new CSS features should not be showing me code spans (in dark mode) with the colour combination of rgb(236, 210, 197) on rgb(250, 243, 243)...
- webstrand 1y agoI see rgb(35, 48, 43) background on the code spans. Do you have some plugin installed that's messing it up?
- zahlman 1y agoApparently, 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.