Created
May 17, 2021 13:37
-
-
Save davidhellmann/5dd6d92238f273e18456838cfa56584c 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
/* | |
// build the clamp property | |
const clamp = (multiMin = 0, multiMax = null) => { | |
const _calcMulti = calcMulti(multiMin, multiMax || multiMin) | |
const _fsMin = _calcMulti.fsMin | |
const _fsMax = _calcMulti.fsMax | |
return `clamp(${_fsMin}rem, calc(${_fsMin}rem + (${_fsMax} - ${_fsMin}) * ((100vw - ${screenMin}rem) / (${screenMax} - ${screenMin}))), ${_fsMax}rem)` | |
} | |
*/ | |
@mixin clamp($properties: font-size, $min: 0.5rem, $max: 1rem) { | |
@each $property in $properties { | |
#{$property}: $min-value; | |
} | |
} | |
.div { | |
@include clamp(); | |
} |
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
/* | |
// build the clamp property | |
const clamp = (multiMin = 0, multiMax = null) => { | |
const _calcMulti = calcMulti(multiMin, multiMax || multiMin) | |
const _fsMin = _calcMulti.fsMin | |
const _fsMax = _calcMulti.fsMax | |
return `clamp(${_fsMin}rem, calc(${_fsMin}rem + (${_fsMax} - ${_fsMin}) * ((100vw - ${screenMin}rem) / (${screenMax} - ${screenMin}))), ${_fsMax}rem)` | |
} | |
*/ |
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