3 ms·
CSS custom properties do however suffer from the same problems as CSS selectors and HTML custom elements, especially the global namespace they use. CSS custom
by pluma 9y ago
CSS custom properties do however suffer from the same problems as CSS selectors and HTML custom elements, especially the global namespace they use.
CSS custom property name conflicts will be just as painful as CSS class name conflicts and HTML custom element name conflicts.
But luckily CSS-in-JS (aka CSS) libraries embracing them already seem to handle them much like class names: an implementation detail you shouldn't worry about so they'll just generate the names for you instead of forcing you to keep track of them.
Of course this means the actual source for these variables will live in JS but this is generally what you want anyway.