Site is currently on development mode

Everything you need to know about CSS Variables

Last updated 2 years ago by Ohans Emmanuel


Most programming languages have support for variables. But sadly, CSS has lacked support for native variables from the very beginning.

You write CSS? Then no variables for you. Well, except if you were using a preprocessor like Sass.

Preprocessors like Sass sell the use of variables as a big add-on. A reason to try them. And you know what? It’s a pretty darn good reason.

Well the web is moving fast. And I’m glad to report that CSS now finally supports variables.

While preprocessors support a lot more features, the addition of CSS variables is a good one. These move the web even closer to the future.

In this guide, I’ll show you how variables work natively in CSS, and how you can use them to make your life a lot easier.

Read full Article