:root most common customer variables
What are the most common custom properties you should put into the :root? Font-size
Font-weight
Colours
what other ones do you use?
2 Replies
prefers-color-scheme is very useful for light and dark themes.
It applies styles based on the user preference system, dark, light. like this:
you should put all the custom properties you want to have available in the entire website
common ones include colors and font sizes and some dimentions (like the gap size, margins, border radius, ...)
also, if you use videos and dialogs, you should pass these to the
::backdrop
pseudo-element, as that one doesn't inherit anything from the parent