Created
November 15, 2017 00:52
-
-
Save delphinpro/68327cc215582161e258d65ef29d18fb 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
@function em($from, $to, $dimension: true) { | |
@return ($from / $to) * if($dimension, 1em, 1); | |
} | |
@function rem($px, $root: 16px) { | |
@return ($px / $root) * 1rem; | |
} | |
@mixin font($font-size, $line-height: null) { | |
font-size: rem($font-size); | |
line-height: if($line-height, em($line-height, $font-size, false), null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment