Created
August 17, 2021 20:35
-
-
Save csilverman/0aa5877e249b7c3339322973d2fb645b to your computer and use it in GitHub Desktop.
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
/// Rem output with px fallback. | |
/// | |
/// @group Typography | |
/// @author Adam Laki | |
/// | |
/// @param {Number} $sizeValue - Element's font size | |
/// @output `font-size` with fallback | |
/// | |
/// @example scss - Set rem font-size to `.foo` | |
/// .foo { | |
/// @include font-size(1.2); | |
/// } | |
@mixin font-size($sizeValue: 1) { | |
font-size: ($sizeValue * 16) * 1px; | |
font-size: $sizeValue * 1rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment