Created
December 26, 2017 11:21
-
-
Save vikt82/ebac10e7e2b34ba968dbf6da4d3d0cff to your computer and use it in GitHub Desktop.
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
set-font-size(value) { | |
font-size: value; /* добавляем PX как подстраховку */ | |
if (value is inherit) { | |
/* делаем если нет значения для шрифта */ | |
} else { | |
font-size: remify(value); | |
} | |
} | |
remify(value) { | |
u = unit(value); | |
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