Variables
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.
- basic syntax
- cascading and inheritance
- variables in variables
- invalid values (background-color: 20px)
- defaults (,black)
Tested browsers
- 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
- On separate Windows 7 virtualizations
- IE11
- On Windows 8.1 virtualization
- On Surface
- Firefox
- 32 on Windows 7, Mac, and Linux
- Safari
- 7.0.5 on Mac
- Chrome
- 37 on Win7, Mac and Linux
- Opera 24
- 24.0 on Win7 and Mac
- Yandex 14
- 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.