Closed kisaragi-hiu closed 3 months ago
Oh man, I can't believe we were missing this (or it broke), thank you @kisaragi-hiu!
Running it locally now
Looks great, thank you!
If you want to make the same change on reactrouter.com I'll be sure to merge it asap
Fixes #260.
The colors of code and pre elements in md-prose blocks are specified here:
which turns into this CSS:
The color rule applies to all prose
code
andkbd
elements, then for specific situations (including under links) the color is reset to inherit. But in dark mode,:is(.dark .md-prose code)
ends up with higher specificity (0-2-1) than.md-prose :is(a, h1, h2, h3, h4, h5, h6) code
(0-1-2), thus nullifying the reset. So adark:text-inherit
needs to be specified explicitly to actually reset the color to inherit in dark mode.