Variables

Back to the index.

Variables specification.

CSS variables allow you to use variables in your CSS: define once, use as many times as you like. This will be especially useful for color schemes.

This is the desktop table. See also the mobile table.

Last major update on 1 October 2014.

I'm writing a CSS book.

Method or property Internet Explorer Firefox Safari Chrome Opera Yandex
7 and lower 8 9 10 11 32 Win 32 Mac 32 Linux 7 37 Win 37 Mac 37 Linux 24 Win 24 Mac 14.8 Win 14.8 Mac
- basic syntax - cascading and inheritance - variables in variables - invalid values (background-color: 20px) - defaults (,black)

Tested browsers

Desktop browser test array 2.0.1; September 2014

IE7 and lower
I removed them, so they’re not tested for newer methods and properties that they don’t support anyway. However, I copy all information from older versions of the Tables.
If IE8 supports a method or property I never tested before I have to guess if IE7 and lower also support it. In general I assume they support the Microsoft-invented properties, but for others I will occasionally have to add a "Don’t know" entry. If IE8 does not support something I never tested before, I assume IE7 and lower also don’t support it.
IE 8, 9, and 10
Trident
On separate Windows 7 virtualizations
IE11
Trident
On Windows 8.1 virtualization
On Surface
Firefox
Gecko
32 on Windows 7, Mac, and Linux
Safari
WebKit
7.0.5 on Mac
Chrome
Chromium 37
37 on Win7, Mac and Linux
Opera 24
Chromium 37
24.0 on Win7 and Mac
Yandex 14
Chromium 36
14.8 on Win7
14.8 on Mac

Operating systems

Mac
MacBook Pro 17'' with OS 10.9.4
This is my main test station. It also runs all virtual Windows systems.
Windows
All downloaded from modern.ie. I use VirtualBox, and downloded the Windows 7 systems for all browsers but IE11, which runs on Windows 8.1.
The non-IE Windows browsers all run on the IE9/Win7 virtualization.
Surface
Microsoft Surface with Windows RT 8.1
Linux
Ubuntu 12.04 on pretty old hardware. Not fair for performance comparisons.