3 ms·
> Then set the elements which should have a primary color with that class. But now your markup is littered with styling classes, and you could end up with a .s
by snarfy 11y ago
> Then set the elements which should have a primary color with that class.
But now your markup is littered with styling classes, and you could end up with a .secondary button with a .primaryColor class.
In vanilla css, the only way to really define something like a primary color just once and have it apply correctly to all elements is to define it at a high level in a deeply nested cascade. This of course all breaks as soon as you add a container element and have to go back and add another level of nesting to your css.
Variables in css should be standard.