Complete the code to define a base font size variable in Sass.
$base-font-size: [1];Setting $base-font-size to 16px is a common practice for base font size in responsive typography.
Complete the code to create a mixin that sets font size responsively using clamp().
@mixin responsive-font($min, $preferred, $max) {
font-size: clamp([1], $preferred, $max);
}The clamp() function requires the minimum font size as the first argument. Using $min passes the variable correctly.
Fix the error in the code to correctly calculate the fluid font size using calc() and viewport width.
$fluid-size: calc([1] + 1vw);
The fluid font size should add a fixed size (1rem) and a viewport width unit (1vw) to scale responsively.
Fill both blanks to create a map of font sizes with keys and responsive values using clamp().
$font-sizes: ( small: clamp([1], 1vw + 0.5rem, 1rem), large: clamp([2], 2vw + 1rem, 3rem) );
The small font size starts at 0.75rem and the large font size starts at 1.5rem as minimum values in clamp().
Fill all three blanks to create a mixin that applies a responsive font size from a map using a key.
@mixin font-size($size-key) {
font-size: map-get($font-sizes, [1]);
line-height: [2];
letter-spacing: [3];
}The mixin uses the variable $size-key to get the font size from the map. Line height and letter spacing are set to common readable values.