Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't a lot of this somewhat moot with PX being a defined thing in browsers that isn't necessarily pixels? Per https://developer.mozilla.org/en-US/docs/Glossary/CSS_pixel

    The term CSS pixel is synonymous with the CSS unit of absolute length px — which is normatively defined as being exactly 1/96th of 1 inch.


Completely irrelevant and MDN is infuriatingly “wrong.”

1px is not 1 physical pixel anywhere anymore. It’s just a “base unit” that we all agreed on decades ago. It could be 4 display pixels, it could be 9, it could be fractional if your monitor is downsampling it. It could be thousands if you zoom in. Heck, with PentTile matrix the pixel is never even “1 rgb pixel”

Also 1px is a digital unit and as such it does not have an “inch” equivalent, as much as designers like to insist that it does. Maybe it comes into play when you print pages, but even then the browser and the user can change the scale, so 1/96th of 1 inch is basically trivia at this point and should never be talked about in the context of “browsing the web”, even if it’s part of the CSS spec.


> 1px is not 1 physical pixel anywhere anymore

Nowhere did MDN make such a statement

> Also 1px is a digital unit and as such it does not have an “inch” equivalent

They're referring to the CSS "inch" (aka `in`). Which, similarly to the "pixel", has an arbitrary but well-defined meaning


I feel like you are ultimately reinforcing the point? PX, especially in CSS, does not refer to a single device pixel. As such, it is just a smaller unit of measure, within all of the other units that are supported.

I grant that it is different from REM, in that it is not dependent on the root font-size. That said, I hesitate to see how that is a bad thing. Seems being stable between font changes is a good thing for most measurements on the page? I suppose it is a perspective of trying to make sure a set number of textual items fit in a space, or of keeping all of the boxes on the page the same size? I could see both being valid.

Edit: to be fair, my point on box sizes is made in the article.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: