|
|
|
|
|
by Chris_Newton
5371 days ago
|
|
Yes, CSS has an unhelpful definition of pixels, which AFAICS is almost universally ignored. No doubt it was well-intentioned, but in the real world, pixels have fixed sizes and display devices do not have infinite resolutions. The difference between professional quality web design and an amateurish mess can be as simple as paying attention to the real pixel grid that your beautiful vector icon/font/whatever will be drawn on and shifting/hinting/whatever accordingly. Given that CSS also recognises length units such as pt, which make far more sense if you really want to specify a physical size for something like a font, distorting the meaning of "pixel" doesn't seem very useful. It's a little like idealised fluid layouts, which quickly gave way to the practical benefits of more controlled layouts and more recently to responsive designs that are specifically tailored to the strengths and weaknesses of different browsing environments. Good design often requires an element of precision, which you simply can't specify if browsers keep moving the goalposts. |
|
Safari on iPhone uses that definition (that's the whole "resolution doubling" thing, in a nutshell).
Gecko uses that definition, including on mobile devices.
In fact, that definition is almost universally _used_ in cases where it matters (i.e. high-dpi displays).
> Given that CSS also recognises length units such as pt
Which are nowadays defined in terms of CSS px, because otherwise sites break. So 1pt == 1.3333px in CSS in most modern browsers.