News for hackers. Stuff that matters.
Re:Typescale: A Tool for Easy CSS Typography by tracker1 on Friday May 19, 2023 @12:32PM (#36003808)
In browsers, there are supposed to be roughly 72px per inch. This should get scaled, assuming the OS/Browser knows what the actual pixel density per inch is. And even then the scaling may not be linear to reality.

If you've ever run a mobile device without the real dimensions set properly (cheaper models, or custom roms) it gets interesting to say the least. Having less than stellar vision up close, I have every accessibility setting on my phone maxed... It's bad enough as it is the number of applications/sites that will render (in particular modals) off-screen.

In the end, however, nearly everything is scaled to either the real pixels, or often assume 72/inch as the actual screen density and scale accordingly. You really never know which.

Re:Typescale: A Tool for Easy CSS Typography by chrismorgan on Friday May 19, 2023 @12:43PM (#36003958)
Correction: The CSS units are defined as 96px = 1in. It’s the point that’s 1⁄72 inch.

My comment elsewhere in the thread is relevant on these units and how they’re anchored: https://news.ycombinator.com/item?id=36001822.

Re:Typescale: A Tool for Easy CSS Typography by tracker1 on Friday May 19, 2023 @04:19PM (#36006388)
Yeah, I often get the two conflated... in either case, it's never, or at least rarely accurate.