DEV Community

Discussion on: Responsive CSS Layouts WITHOUT Media Queries

Collapse
 
mnali220594 profile image
Muhammad Nur Ali

Hi, its really nice article. Btw, do you have any tricks to use responsive font size without media query ? I usually use media query to resize the font, but the font size is not scaling in the larger device screen, its size just fixed based on i defined in media query

Collapse
 
kylefilegriffin profile image
Kyle Griffin

You can use calc combined with media queries.

font-size: calc(16px + 0.5vw);

This will scale your font with the width of the screen. Of course, the caveat being that on a TV or abnormally ultra wide screen, you'll have issues with text being huge. So you'll need to use media queries to tame it.

Thanks!