Remix.run Logo
cwillu 3 days ago

Wow, they managed to make a website that scales everything except the main text when adjusting the browser's zoom setting.

essentia0 3 days ago | parent | next [-]

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.

rezonant 3 days ago | parent | prev | next [-]

There should be a law for this. Who in their right mind wants this?

hiisukun 3 days ago | parent | prev | next [-]

It's interesting how this (and other css?) means the website is readable in a phone in portrait, but the text is tiny in landscape!

BiteCode_dev 2 days ago | parent | prev [-]

It's a quantum zoom: it's zoomed in and not zoomed in at the same time.