Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On HiDPI mobile devices, pixels aren't real pixels. They're actually treated like points -- a pixel in CSS ends up being something like 3-ish real device pixels, plus or minus, depending on the device.


Windows: pixels are pixels. Some systems there (e.g. WPF) use also dip units (Device Independent Pixel, 1/96in == 1px in twisted CSS terms). And that's how it should be done in CSS form the very beginning.

MacOS/iOS uses screen units. Each such unit is of N physical pixels. Where N is a number obtained by [ nsscreen backingScaleFactor] function for particular screen (monitor).


> Device Independent Pixel, 1/96in == 1px

That's a point. 12pt font means 12 points.


A point is 1/72". A dip is 1/96".




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: