zeljkoprsa / waterlee-boilerplate

Magento HTML5 Responsive Theme Boilerplate
Creative Commons Zero v1.0 Universal
293 stars 102 forks source link

remove all instances of "0rem" #60

Closed austinpray closed 10 years ago

austinpray commented 10 years ago

https://github.com/zeljkoprsa/waterlee-boilerplate/search?utf8=%E2%9C%93&q=+0rem%3B&type=Code

Why would you use such a brittle way to say "zero"?

All of these statements using 0rem units will not work on IE8.

Take a look at this fiddle for an example: http://jsfiddle.net/austinpray/nn4c88or/

chrome screenshot 2014-10-25 13 53 14

IE8 screenshot 2014-10-25 13 53 05

padding-left: 0rem;

and

padding-left: 0;

are exactly the same but the latter works on every browser ever. You have just caused a nightmare for anyone who needs to provide support for IE8.

If my browser support argument doesn't faze you, consider that removing these 64 instances of rem will save almost a whole ~200bytes in stylesheet filesize :)

austinpray commented 10 years ago

For science:

ag " 0rem" --nogroup --sass | awk '{print substr($1,1,index($1,":")-1);}' | xargs -I {} sed -i -e 's/ 0rem/ 0/g' {}