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

Ah, that could be the misunderstanding.

You don’t have non-scaled content in the design. Everything is scaled. <img width="32" height="32"> will be 32px (as in, CSS pixels) wide, whether that means 32dpx (device pixels) or 64dpx or something else.

(OK, so there are a few escape hatches; you have things like <img srcset> which allow you to choose different image sources for different scaling factors, and you can also query devicePixelRatio and change things based on it—though all of this isn’t actually guaranteed to map to physical pixels, e.g. my system uses 1.5× scaling but Firefox hasn’t finished implementing fractional scaling under Wayland so it renders at 2× and then scales down to 1.5×, so any line that is carefully made “one device pixel wide” will actually only be ⅔ of a device pixel.)



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

Search: