Introduces cascading variables as a new primitive value type that is accepted by all CSS properties, and custom properties for defining them.
CSS Custom Properties are included in Edge 15, which shipped today (11th April) with Windows 10 Creators Update.
Please act now! Having Chrome and Safari 9.1 supporting CSS Variables very soon, Edge will be the only browser left lacking this feature!
Jan Miksovsky commented
As noted below, CSS Variables are now in WebKit. Apple just announced that they'll be available in OS X Safari 9.1: https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_1.html#//apple_ref/doc/uid/TP40014305-CH10-SW1.
Chrome 49 ships support for CSS Variables. Please act now!
Jordan Robert Dobson commented
Firefox has had this since July 2014 and how Chrome will have it too: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/iJ_enKAj9gE
Neil M commented
Check out this informative write-up on the pros and cons of using custom variables now that it is available in Chrome. By Philip Walton. http://philipwalton.com/articles/why-im-excited-about-native-css-variables/
CSS variables just landed in WebKit and will soon land in Chrome/Opera, leaving Edge as the only one not implementing.
Lea Verou commented
@Gregory: You cannot emulate CSS variables with a preprocessor, they’re dynamic. You can change their value with JS and have it update in every place using the variable automatically. Not to mention that they inherit like all other CSS properties instead of being lexically scoped like they are in preprocessors.
Gregory Bolkenstijn commented
Use a pre-processor people! And vote for more important features.
The Chrome team started to (re)implement this features again:
Arthur Weborg commented
Carter Li commented
Also useful for Web Comonents
As DependencyProperty for CustomControl in WPF.
Carter Li commented
Evgeny Vrublevsky (VEG) commented
I think that it is very useful function. It is better to support this feature ASAP.
Aaron Gustafson commented
Honestly, I think this is something best left to pre-processors. I don’t want the browser to have the overhead of having to process the CSS in this way. Also, there is no fallback for older browsers that don’t support variables.
This is a bad idea. I hope it is abandoned.
Dave Eave commented
ommm, use sass