Skip to content

Comment on In CSS, “px” is not an angular measurement and it is not non-linearparent

Comments

The most important thing to take away from the original is that the css unit "px" has no relationship to the actual size of a pixel on the screen

Did you read this article?

Did you make it to this part?

    I’ll just finish by going through a few of the explicit
    claims made in that article and correcting them:

    [...]

    2. The first sentence: “The “px” unit in CSS doesn’t really
    have anything to do with screen pixels, despite the poorly
    chosen name.” – this is obviously complete nonsense. The
    standards authors went out of their way to give browser
    authors a way to match the “px” unit up to the real-world
    device pixel
> and all the physical units (inch, cm, pt) are defined in terms of the csspixel.

Not for print and other high-res devices (like a Retina display). Did you read this excerpt quoted from the CSS spec?

    For print media and similar high-resolution devices, the
    anchor unit should be one of the standard physical units
    (inches, centimeters, etc). For lower-resolution devices,
    and devices with unusual viewing distances, it is
    recommended instead that the anchor unit be the pixel unit.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.