@mkboris
Posted
To change font sizes without using media queries you can use the clamp() function, it allows you to set a minimum, preferred, and maximum size, making the font size responsive to the viewport.
Example :
body {
font-size: clamp(1rem, 2vw + 1rem, 2rem); /* Minimum 1rem, ideal size based on viewport, maximum 2rem */
}
Marked as helpful