The official W3C documentation says:
1 px = 1/96th of 1 in
In my previous 18.5 inch screen, the screen.width
was 1367 px
and the screen width in inches was 14 inches
. By the W3C formula:
14 * 96 px = 1344 px
The W3C formula deviated by 20/14 px per inch
. Since the deviation is too low, and 1 inch
on my screen was 97.4 px
I accepted the W3C formula, and believed that a CSS pixel is an absolute unit of measure
, meaning it is always equal to 0.75 pt
(a physical unit).
This week I bought a 21.5 inch, full HD screen, which has width 19 inches
and screen.width
is 1920 px
. So now 1 inch
on my screen is:
1920/19 ~ 101 px
Not only this, my friend's screen is 24 inches, and has the same 1920 x 1080 resolution. Both 24 inches and 21.5 inches cannot correspond to same amount of CSS pixels.
So now, on my screen, CSS pixels is not an absolute unit of measurement. And everything is relatively smaller on my screen. Even that, now I get deluded by my font sizes. When I find 16 px as minimum readable font on my screen, it is actually larger on smaller screens. Because 16 px
on my screen is physically the same in centimeters as 14px
in centimeters on my previous smaller screen. I am designing my websites wrong and I am not a good front end developer anymore.
So the question:
- Is a CSS pixel really an absolute unit? That is, is 1 inch = 96 px true?