3 msΒ·
Inches in css aren't in any way related to physical inches. CSS has no knowledge of your physical screen dimensions. Rather an inch was defined early on in the
by jjcm 7y ago
Inches in css aren't in any way related to physical inches. CSS has no knowledge of your physical screen dimensions. Rather an inch was defined early on in the history of css as "1 inch in pixels of a 17 inch screen at 1280x1024 resolution" This happens to be 96.42 pixels, which rounded down to 96. So not only is it an obscure unit, it's also a misleading one.
On your 4k monitor 96 pixels is more than likely not an inch (unless your monitor is slightly over 42 inches), so it wont solve your small app problem in any form, it will just make things more obscure.
In addition to this, you'll also end up with many subpixel values. While this wont matter for ππππππ in the example I posted above (as border always snaps to the nearest dp unit), it will create blurry effects on lower DPI screens for other css rules that do respect subpixel values (i.e. πππ‘-ππππππ : πΆ πΆ πΆ πΆ.πΈππ #πΆπΆπΆ; will create a blurred border effect).
- ChrisSD 7y agoThat said, Mozilla did use to have the experimental `mozmm` unit that attempted to accurate represent the millimetre. However it was removed a few versions back.
- majewsky 7y ago> On your 4k monitor 96 pixels is more than likely not an inch (unless your monitor is slightly over 42 inches) That's good to know. My 4k monitor, coincidentally, is about 40.5 inches, so CSS inches are displayed almost correctly.