The spec fafs around a bit talking about how the px is a "visual angle unit" But I am unable to form an interpretation where the "reference pixel" is anything other than 1/96 inch.
https://drafts.csswg.org/css-values/#absolute-lengths
I guess theoretically a tv could say "this tv will be viewed at 12 feet away so our reference pixel is 1/16 inch" and still be in spec. Which sounds like it has messy implications, Does anyone do this?
Anyway the point being a pixel should fundamentally be a hardware measurement, and if they wanted a "visual angle unit" they should have introduced one.(the moa?) But the last thing we need is a pixel being defined as a hard 1/96 of a inch. which is what we got.
what the spec says doesn't really matter though, the spec is just nonsense people wrote down to try to back-explain decisions that the browsers had already made.
pixels are pixels, and no browser implements them as a fractional-inch measurement. in every actual implementation i'm aware of, they're a hardware based unit.
Windows used to let you set the DPI setting of the monitor, circa Win95-WinXP. Software tended to only expect a value of 96dpi, so it wasn't a very practical setting to change, and eventually windows introduced display scaling (which leaves old software in the belief that you are on a 96dpi screen, while allowing software to opt in to knowing about the real device pixels)
Screenshot: https://www.softacom.com/wp-content/uploads/2022/03/11111-10...
I guess you could use that setting on an old version of windows to set a screen to 16dpi, and now a CSS reference pixel is 1/3rd of a real pixel? But more realistically, what the spec is getting at is that a mobile device should set its dpi setting close to the real device setting, and a reference pixel is now something that looks about as big as a pixel on a 96dpi screen. That nobody actually sets their screen dpi on desktops is probably of secondary importance to them