Created
September 15, 2021 21:45
-
-
Save mattpilott/41f2d995e1ee9064b1e990dfa602e33b 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
@mixin clamp($prop, $min, $max, $multi: 100vw) { | |
@supports ($prop: clamp(0, 0, 0)) { | |
#{$prop}: clamp(#{$min}, #{$multi}, #{$max}); | |
} | |
@supports not ($prop: clamp(0, 0, 0)) { | |
#{$prop}: $min; | |
@media (min-width: 48em) { | |
#{$prop}: $multi; | |
} | |
@media (min-width: 72em) { | |
#{$prop}: $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); | |
@include clamp(font, 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); | |
} | |
@supports (font: clamp(0, 0, 0)) { | |
html { | |
font: clamp(2rem, 100vw, 3rem); | |
} | |
} | |
@supports not (font: clamp(0, 0, 0)) { | |
html { | |
font: 2rem; | |
} | |
@media (min-width: 48em) { | |
html { | |
font: 100vw; | |
} | |
} | |
@media (min-width: 72em) { | |
html { | |
font: 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