3 ms·
CSS Variables are a misnomer. They're custom properties that obey cascade and inheritance. CSS preprocessors can do only lexically scoped substitutions. With C
by pornel 13y ago
CSS Variables are a misnomer. They're custom properties that obey cascade and inheritance.
CSS preprocessors can do only lexically scoped substitutions. With CSS "variables" you can have values inherited within DOM's scope.
- ufo 13y agoCan you give an example of a situation where you would rather have cascading variables than lexical scope?
- pornel 13y ago• JS libraries implementing polyfills for new CSS properties or their own CSS-like behaviors (e.g. `--masonry-display: jagged-grid`) • themes (`--theme-color` that can be inherited and overridden just like `color` would)