Attempting to use CSS variables as the following (which are supported by all major browsers)
:root { --color-main: #06c; } #foo h1 { color: var( --color-main ); }
fails with some very unfriendly error messages:
- Unrecognized or unsupported property at line 2 character 3.
- Invalid or unsupported value for property color at line 6 character 10.
Looking at the source code I discovered this comment which says:
This intentionally doesn't support cascading variables since that seems impossible to securely sanitize.
The comment unfortunately does not elaborate further ... I don't know what exactly about CSS variables was deemed impossible to sanitize. I might be ignorant but I don't see the problem.