mobi-css / mobi.css

A lightweight, scalable, mobile-first CSS framework
http://getmobicss.com/
MIT License
2.34k stars 145 forks source link

Using CSS variables in Mobi.css v3 #79

Open xcatliu opened 7 years ago

xcatliu commented 7 years ago

After some investigating, I think maybe it's time to use css variables in Mobi.css@2.0.0

First of all, css variables is the future of css. It's already drafted three years ago, and most of modern browsers supports it. There is a demo here.

Secondly, for me, the most useful feature of SASS is variables. Css variables not only extends the all function of SASS variables, but also has some exciting features. Such as scoping, calculating and re-rendering in time.

Last, using css variables can bring us a comfortable way to customizing themes, just need to override some variables. No more compiling!

xcatliu commented 7 years ago

https://philipwalton.com/articles/why-im-excited-about-native-css-variables/

xcatliu commented 7 years ago

It's too risky to use css variables now, let's put it in the v3