Remix.run Logo
essentia0 3 days ago

They set the root font size relative to the total width of the screen (1.04vw) with the rest of the styling using rem units

Ive never seen anyone do that before.. It may well be the only way to circumvent browser zoom

rendaw 3 days ago | parent | next [-]

Why don't browsers reduce the screen width when you zoom in, as they adjust every other unit (cm, px)?

zamadatix 3 days ago | parent [-]

They effectively do. All css absolute units are effectively defined as ratios of each other and zoom*DPI*physicalPixels sets the ratio of how many physical pixels each absolute unit will end up turning into. Increase zoom and the screen seems to have shrunk to some smaller 'cm' and so on.

For things like 'vh' and 'vw' it just doesn't matter "how many cm" the screen is as 20% of the viewing space always comes out to 20% of the viewing space regardless how many 'cm' that is said to be equivalent to.

rendaw 2 days ago | parent [-]

Oh duh, right. Thanks!

imglorp 3 days ago | parent | prev [-]

Why is it so desirable to circumvent browser zoom? I hate it.