Created
March 22, 2023 19:01
-
-
Save Wolfr/2631db2e066460e1edfce19ea1bb8dc6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
$html-font-size: 16px; | |
$enable-rem: true; | |
@function stripUnit($value) { | |
@return $value / ($value * 0 + 1); | |
} | |
@function rem($value) { | |
@if $enable-rem { | |
@return #{$value/stripUnit($html-font-size)}rem; | |
} | |
@return $value + px; | |
} | |
.component { | |
font-size: rem(14); | |
} | |
.component { | |
padding: rem(16) rem(12) rem(8) rem(4); | |
} | |
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
.component { | |
font-size: 0.875rem; | |
} | |
.component { | |
padding: 1rem 0.75rem 0.5rem 0.25rem; | |
} |
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
{ | |
"sass": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment