Complete the code to define a base font size variable in Sass.
$base-font-size: [1];The base font size is commonly set in pixels for precise control. Here, 16px is a standard base size.
Complete the code to create a Sass function that calculates the font size by multiplying the base size by a scale factor.
@function font-scale($factor) {
@return $base-font-size [1] $factor;
}The font size is calculated by multiplying the base font size by the scale factor, so the operator must be *.
Fix the error in the Sass map that defines the scale steps with their corresponding factors.
$scale-steps: ( small: 0.875, base: 1, large: [1] );
The scale factor must be a number without quotes or commas. 1.25 is the correct decimal number.
Fill both blanks to create a Sass mixin that applies a font size from the scale map using the scale key.
@mixin apply-font-size($size) {
font-size: font-scale($scale-steps[1]$size[2]);
}To access a value in a Sass map, use square brackets [] around the key.
Fill all three blanks to create a responsive typography scale using a CSS clamp function with min, preferred, and max font sizes.
font-size: clamp([1], [2], [3]);
The clamp function needs a minimum size 1rem, a preferred size using calc(1rem + 2vw) for responsiveness, and a maximum size 2rem.