Last active
February 20, 2020 10:11
-
-
Save munkacsitomi/fca54804f62484f70c310632fbdf66ec to your computer and use it in GitHub Desktop.
Font-size calculator helper sass function
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
@function calculateRem($size) { | |
$remSize: $size / 16px; | |
@return $remSize * 1rem; | |
} | |
@mixin font-size($size) { | |
font-size: $size; | |
font-size: calculateRem($size); | |
} | |
.example { | |
@include font-size(14px)' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment