Pushplaybang / knife

Nail vertical rhythm, modular scale, and REMs like a boss with this simple set of SASS/SCSS variables, functions and mixins.
http://pushplaybang.github.io/knife/
MIT License
67 stars 6 forks source link

Streamlined calculateRem / krem, incorporating stripUnits to accept non ... #9

Closed whatsnewsisyphus closed 10 years ago

whatsnewsisyphus commented 10 years ago

...px size declarations

included a stripUnits function as suggested by https://github.com/ronilaukkarinen on https://github.com/Pushplaybang/knife/issues/3. This is originally an excerpt from https://github.com/sass/sass/issues/533 by https://github.com/robwierzbowski

The suggestion on https://github.com/Pushplaybang/knife/issues/3 broke the ie/px fallback, printing unitless units like the following, so I plugged in stripUnits there as well, and added the px suffix back in

font-size:16;
font-size:1rem

Streamlined calculateRem while I was at it