- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 11 Mar 2019 20:06:39 +0000
- To: public-css-archive@w3.org
If you know how large the device pixel is, relative to your normal measurement units of `px`, then you can do useful, meaningful things with a unit that exactly represents a device pixel. So, JS (or native app code) can be trusted with that information. You just can't meaningfully use it in raw CSS, because you don't know how big it will be; *anything* you size in it will look "correct" on one device, but then will look different on another. Note that even rounding to an integer number of device pixels isn't actually often useful, as you need to also ensure that it's *positioned* in device pixels, so that it lines up with the grid properly. This happens automatically for borders, as they're magically snapped to the device pixel grid, but not for anything else. --------- I'm gonna go ahead and close this issue as rejected; there's many reasons not to add a device pixel unit. However, I've opened #3720 to track the addition of a 'hairline' keyword specifically for borders, as that's the only use-case I've been able to extract from this. ^_^ -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3715#issuecomment-471703781 using your GitHub account
Received on Monday, 11 March 2019 20:06:41 UTC