Anyone ever tried this trick - em and vmax

So I was playing around with a responsive layout for research and had used the 62.5% trick to reset em’s to a more sane and inuitive 10px

html { font-size: 62.5% }

I built out the whole layout and on a lark decided, what if, below a certain screen size, I set the base rems to vmax…

@media (max-width: 767px), (max-height: 719px) { font-size: 1vmax; }

The result astonished me - the whole page scaled with the viewport and to I only needed 5 other media queries to do small adjustments.

Anyone else played with doing this kind of cross over assignment?

Yeah, this stuff is fun to play with. Did you consider using vw or vh for font sizes instead? They seem to be better supported.

I’d like to see a Pen of what you’ve done. :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.