Created
September 15, 2021 23:06
-
-
Save mattpilott/86700dc11a51884f0ae0f62a42400eb7 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
$wrap: 1920; | |
@function strip-unit($number) { | |
@if type-of($number) == 'number' and not unitless($number) { | |
@return $number / ($number * 0 + 1); | |
} | |
@return $number; | |
} | |
@function clampy($min, $max, $multi: (strip-unit($max) / $wrap) * 100vw) { | |
@return min(max(#{$min}, #{$multi}), #{$max}); | |
} | |
html { | |
--family: -apple-system, Roboto, sans-serif; | |
--h1: 3rem / 1.3 var(--family); | |
--h2: 2.5rem / 1.3 var(--family); | |
--h3: 2.25rem / 1.3 var(--family); | |
--h1: #{clampy(2rem, 3rem)}; | |
} |
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 { | |
--family: -apple-system, Roboto, sans-serif; | |
--h1: 3rem / 1.3 var(--family); | |
--h2: 2.5rem / 1.3 var(--family); | |
--h3: 2.25rem / 1.3 var(--family); | |
--h1: min(max(2rem, 0.15625vw), 3rem); | |
} |
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