Skip to content

Winning with CSS Variables

Updated: at 03:29 PM

Some cool ideas of things to do with CSS variables; now supported by all modern browsers

CSS variables now enjoy wide cross-browser support. But what are they and why should we use them?

Any CSS property — color, size, position, etc. — can be stored in a CSS variable. Their names are all prefixed with —, and you declare them by adding them to an element right where you add its other styles.

Read more from the source: