An Interest In:
Web News this Week
- April 30, 2024
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
November 27, 2019 03:22 pm GMT
Original Link: https://css-tricks.com/the-power-and-fun-of-scope-with-css-custom-properties/
The Power (and Fun) of Scope with CSS Custom Properties
Youre probably already at least a little familiar with CSS variables. If not, heres a two-second overview: they are really called custom properties, you set them in declaration blocks like --size: 1em
and use them as values like font-size: var(--size);
, they differ from preprocessor variables (e.g. they cascade), and heres a guide with way more information.
But are we using them to their full potential? Do we fall into old habits and overlook opportunities where variables could significantly reduce … Read article
The post The Power (and Fun) of Scope with CSS Custom Properties appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/the-power-and-fun-of-scope-with-css-custom-properties/
Share this article:
Tweet
View Full Article