Re:Building your color palette
by katsura on Saturday November 10, 2018 @03:59PM
(#18423479)
You can use CSS variables, no preprocessor necessary for newer browsers:
[ Parent
| on HN ]
Re:Building your color palette
by cmroanirgo on Sunday November 11, 2018 @03:15PM
(#18428327)
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 [1] https://github.com/aaronbarker/css-variables-polyfill (or 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).