You're creating a fluid typography system where the font size should never go below 16px, never exceed 32px, and scale smoothly between these values based on the viewport width. Which CSS function will help you achieve this?
- calc(16px + 3vw + 1vh - 32px)
- clamp(16px, (3vw + 1vh), 32px)
- fluid-size(16px, 32px)
- font-size: 16px; min-font-size: 32px; vw-font-scale: 3vw; vh-font-scale: 1vh;
To create a fluid typography system with specified limits and smooth scaling based on viewport width, you should use the clamp() function. The correct option is clamp(16px, (3vw + 1vh), 32px), which ensures the font size stays between 16px and 32px while smoothly scaling with viewport width changes.
Loading...
Related Quiz
- You have a style rule with a class selector that is not being applied, even though another rule with three type selectors is applied to the same element. What could be the reason based on specificity?
- The animation-direction property can be set to ________ to make the animation play in reverse direction.
- In terms of performance, why might you opt for the "woff2" font format over others?
- The technique where a low-quality font is shown first and then replaced by a higher-quality font when it's loaded is known as ________.
- The ::after pseudo-element in CSS is typically used to ________.