Hacker News new | ask | show | jobs
by ossopite 1562 days ago
This sounds plausible but I'm not sure it's quite accurate, because in my experience, zooming in also affects the size of things that use px units in CSS.
2 comments

Yeah, zoom changes page scale factor you can see it's computed value window.devicePixelRatio and that in return changes everything. Font-size can be also be changed independently of zoom inside browser settings.

https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...

px units are not actual pixels, they're a synthetic approximation. I don't remember the exact formula but I'm sure it's affected by font scaling the same as everything else.
They're defined in terms of inches. I don't remember the fraction of an inch that a CSS pixel is.
I believe it's 1/96, while a point is 1/72.