2 ms·
Great suggestion, but due to extremely poor support [0], it might be best to use a polyfill [1] [0] https://caniuse.com/#feat=css-variables https://caniuse.com
by cmroanirgo 8y ago
Great suggestion, but due to extremely poor support [0], it might be best to use a polyfill [1]
[0] https://caniuse.com/#feat=css-variables https://caniuse.com/#feat=css-variables
[1] https://github.com/aaronbarker/css-variables-polyfill https://github.com/aaronbarker/css-variables-polyfill (or https://github.com/jhildenbiddle/css-vars-ponyfill https://github.com/jhildenbiddle/css-vars-ponyfill)
Personally, I don't like forcing JS to make things render properly on the client, but it depends on the project whether it's acceptable or not.
However, it kind of defeats the purpose, because if you're willing to use a polyfill, then you may as well use sass or less as a solution anyway (and get a range of benefits that they provide).