Skip to content

Instantly share code, notes, and snippets.

@Wolfr
Created March 22, 2023 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wolfr/2631db2e066460e1edfce19ea1bb8dc6 to your computer and use it in GitHub Desktop.
Save Wolfr/2631db2e066460e1edfce19ea1bb8dc6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
$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);
}
.component {
font-size: 0.875rem;
}
.component {
padding: 1rem 0.75rem 0.5rem 0.25rem;
}
{
"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