4 ms·
It's a little complicated and (I'd argue) mildly broken[1], but roughly, 'in', 'cm', and 'pt' all refer to real-world distance measurements; 'em', 'en', and 'ex
by blahedo 16y ago
It's a little complicated and (I'd argue) mildly broken[1], but roughly, 'in', 'cm', and 'pt' all refer to real-world distance measurements; 'em', 'en', and 'ex' refer to sizes relative to the font size; 'px' is a modified real-world measure that scales with distance[2]; and there is nothing at all that refers to actual, honest-to-god pixels. Scaling 'px' during a zoom is no more standards-violating than scaling 'in' etc. during a zoom.
[1]Because 'px' doesn't refer to pixels.
[2]It refers to a unit that scales according to display resolution and usual distance from eye; essentially it's a measure of the angle subtended on your retina. This is useful because (in theory) 1px will look "the same size" (and be about as legible) on a mobile phone, on a laptop, on a desktop, or on a projector, whereas 1in or 1pt(=1/72in) will appear much smaller if further away. What 1px is not, however, is a "pixel".
- seabee 16y agoNow comes the question: if 'px' isn't it, is there any unit that corresponds 1:1 with a bitmapped image?
- wmf 16y agoAt default zoom level, 1 px should be 1 pixel except on "retina" displays where it is 2 pixels or printers where it is 3-5 dots. http://webkit.org/blog/55/high-dpi-web-sites/ http://webkit.org/blog/55/high-dpi-web-sites/ http://www.w3.org/TR/CSS21/syndata.html#length-units http://www.w3.org/TR/CSS21/syndata.html#length-units
- pornel 16y agoYes, px. Bitmaps should be scaled from device pixels to CSS pixels.