Design Nomenclature / Systems & Spec

CSS pixel

Also called px, reference pixel, device-independent pixel, dip

This entry has not been translated yet and is shown in English.

The abstract unit CSS lengths resolve to: an angular reference — about 1/96 inch at arm's length, a visual angle near 0.0213° — rather than a hardware pixel. It maps to device pixels through the device pixel ratio, so one CSS px is two or three physical pixels on most phones, and more again under zoom.

Four lengths drawn to scale from a common origin against a CSS-pixel grid: one CSS pixel at 1; one device pixel at a device pixel ratio of 2, measuring 0.5 — half the CSS pixel, so two of them span it; one device pixel at a ratio of 3, measuring 0.3333, so three span it; and one point at 1.3333, longer than the CSS pixel. The device pixel shrinks while the CSS pixel does not, which is the whole distinction.

In practice

Assumed to be a screen pixel, which it hasn't been since about 2010. WCAG's 24×24 target and 320px reflow width are CSS pixels — measured after zoom, not in hardware.

Not to be confused with

How this term connects

BreakpointDPIFluid scalePicaPointPPIReflowRemTarget sizeCSS pixel
Related Confused with