Custom CSS has no effect once a visitor toggles dark mode

What you are seeing

My custom CSS has no effect once a visitor toggles dark mode.


#Why it happens

The built-in palette is defined at a higher specificity than a plain :root rule, so a bare :root override loses.


#What to do

Target :root.light and :root.dark in your custom CSS. (Custom CSS is API-only, there is no UI field.)



Found it? Good.