3 ms·
Does anyone know if there's a polyfill for CSS variables out there? Possibly a library that creates plain old CSS out of the one that uses variables. It would b
by georgecalm 13y ago
Does anyone know if there's a polyfill for CSS variables out there? Possibly a library that creates plain old CSS out of the one that uses variables. It would be useful until this is rolled out to other browsers.
- camus2 13y agoIs this the final variable spec?, creating a simple processor should not be too complicated,the issue would be on the javascript side,since it seems these vars are accessible from javascript.
- andreypopp 13y agoThere's rework-vars[1] for rework[2] which provides CSS style variables but w/o inheritance so it's not a polyfill technically. [1]: https://github.com/visionmedia/rework-vars https://github.com/visionmedia/rework-vars [2]: https://github.com/visionmedia/rework https://github.com/visionmedia/rework
- yuchi 13y agoYou cannot build a polyfill with full feature-parity with the sole CSS. How do you manage the following one: a:link { color: var(main-color); } .important-quote { var-main-color: red; } /* <div class="important-quote"> <a href="#">Hi, I should be red;</a> </div> */ Mh.. Well you could actually do some kind of @extend-on-steroids, if you do not care to bloat your styles.