_fn.scss
2 years ago
_header.scss
2 years ago
_inputs.scss
1 year ago
_layouts.scss
2 years ago
_reset.scss
2 years ago
_sections.scss
2 years ago
_utilities.scss
2 years ago
_variables.scss
2 years ago
main.scss
2 years ago
_fn.scss
13 lines
| 1 | @use 'sass:math'; |
| 2 | @use 'variables'; |
| 3 | |
| 4 | // @see https://css-tricks.com/linearly-scale-font-size-with-css-clamp-based-on-the-viewport/ |
| 5 | @function scaleBetween($minFontSize, $maxFontSize) { |
| 6 | $maxWidth: variables.$containerMaxWidth; |
| 7 | $minWidth: variables.$desktopMinWidth; |
| 8 | $slope: math.div(($maxFontSize - $minFontSize), ($maxWidth - $minWidth)); |
| 9 | $yAxisIntersection: -$minWidth * $slope + $minFontSize; |
| 10 | |
| 11 | @return clamp($minFontSize, $yAxisIntersection + ($slope * 100vw), $maxFontSize); |
| 12 | } |
| 13 |