# 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.) --- ## Related [Theme's custom CSS or design tokens disappeared after saving AppearanceThe theme is replaced wholesale on save; any client that sends a partial theme wipes the f](https://help.gocapable.com/sites/theme-s-custom-css-or-design-tokens-disappeared-after-saving-appearance.html) [Password-protected site's sign-in button does nothingPassword sign-in needs JavaScript and modern browser crypto. With JavaScript off, the form](https://help.gocapable.com/sites/password-protected-site-s-sign-in-button-does-nothing.html) [Other problemsThe rest of this family.](https://help.gocapable.com/sites/other-problems.html) --- _Found it? Good._