What is the difference between CSS variables and preprocessor variables?

Chris Coyier, CSS Tricks, Oct 25, 2016
Commentary by Stephen Downes

The world of web page style has become complicated and complex, partially because of the need to support numerous browsers (both PC based and mobile) and partially because large-scale projects require variables and functions to facilitate management. This article looks at one aspect of that, CSS variables. Of particular value is the discussion of the role of CSS preprocessors like Stylus, Less, and PostCSS. These take youir default values for things like colours and text styles and turn them into standards-compliant CSS code. Of course, you could just use CSS variables to accomplish the same thing without so much work. And you can use Javascript to manipulate these directly. But you begin to run into cross-browser implementation issues.

Views: 0 today, 408 total (since January 1, 2017).[Direct Link]
Creative Commons License. gRSShopper

Copyright 2015 Stephen Downes ~ Contact: stephen@downes.ca
This page generated by gRSShopper.
Last Updated: May 27, 2018 07:23 a.m.