Hi I’m trying to use vars for my colors in my css but I can’t seem to get it to respond.
Tried in my external css
:root{ var-red: #C00; }
.redMenu { background: var(red); }
also tried
html { var-red: #C00; }
Can’t get it to respond. Any ideas?
Ok so I just realised that this is still experiment tech I guess =( Boo hurry up and make it work W3C!
Now to change back all my code the old way …
Yes, CSS vars are still a work in progress and not supported on the client-side. FYI, I do know of some web developers who use dynamic CSS language packages that enable CSS variables, such as LESS:
http://lesscss.org/