Last active
December 17, 2015 13:49
-
-
Save simondell/5619742 to your computer and use it in GitHub Desktop.
SASS Mixin for writing out equivalent font-sizes in px and rem units. Copied from somewhere. Probably Chris Coyler's CSS-Tricks.
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
// Calculate px and rem font-sizes | |
// - assumes html { font-size: 10px; } | |
@mixin font-size( $size ) { | |
$pixels: #{$size}px; | |
$rems: #{$size/10}rem; | |
font-size: $pixels; | |
font-size: $rems; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment