Last active
April 10, 2019 09:19
-
-
Save davaynamore/4c3d3d6c69d2f08fa194bd16a91a7f08 to your computer and use it in GitHub Desktop.
pixel to rem
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
$base-size: 16px; | |
@function px_to_rem($target, $context: $base-size) { | |
@if $target == 0 { @return 0 } | |
@return $target / $context + 0rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment