Created
May 30, 2019 12:59
-
-
Save didiraja/799aafa8f0cfad7c63ec54a1147b963c to your computer and use it in GitHub Desktop.
Stylus/SASS/LESS - Converting Rem to Px
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem(value) { /* separate mixin, so it can be used elsewhere */ | |
u = 'px'; | |
if (u is 'px') { | |
return unit(value/16, 'rem'); | |
} else { | |
return unit(value, u); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment