Hacker News new | ask | show | jobs
by jan_Inkepa 1494 days ago
>“For screen displays, it traditionally represents one device pixel (dot). However, for printers and high-resolution screens, one CSS pixel implies multiple device pixels. 1px = 1/96th of 1in.”

And this multiple isn't necessarily an integer, it's specified as a floating point number (though I've in practice only seen fractional parts of .5 (on a samsung galaxy IIRC) )

( https://developer.mozilla.org/en-US/docs/Web/API/Window/devi... )

1 comments

Blink on Android maps CSS pixels to Android's DP (density-independent pixel) unit, which is derived from a device's "density bucket", which traditionally has been defined by some multiple of 160ppi in .5x increments. There are some oddball values out there (e.g. the "tvdpi" bucket for Android TV apps), but you'll usually see the .5 multiple on phone-sized screens.