Last active
August 29, 2015 13:56
-
-
Save fieldoffice/9137575 to your computer and use it in GitHub Desktop.
SCSS Pixel to REM conversion with px fallback for older browsers
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
| @mixin font-size($size, $base:16) { | |
| font-size: $size + px; | |
| font-size: $size/$base * 1rem; | |
| } | |
| @include font-size(32); | |
| p { | |
| font-size: 32px; | |
| font-size: 2rem; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment