-
-
Save Zet-Web/865c0c7db6d9f52748df to your computer and use it in GitHub Desktop.
sass px to em mixin
This file contains hidden or 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
| // http://viljamis.com/blog/2013/prototyping-responsive-typography/?utm_source=Responsive+Design+Weekly&utm_campaign=76e7785581-Responsive_Design_Weekly_046&utm_medium=email | |
| $browser-context: 16; // Default | |
| @function em($pixels, $context: $browser-context) { | |
| @return #{$pixels/$context}em | |
| } |
This file contains hidden or 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
| body { | |
| font-size: em(16); | |
| } | |
| p.intro { | |
| font-size: em(24); | |
| } | |
| h1 { | |
| font-size: em(72); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment