Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 27, 2019 03:22 pm GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks