[csswg-drafts] [css-values] Proposal for add a devcie pixel unit (#3715)

cncuckoo has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values] Proposal for add a devcie pixel unit ==
The primary use case for device pixel is the mobile Web, where it is a very common need to render the real 1px width borders on high density screens. Here, the real 1px width means the device pixel width.

So far, Safari has implemented 0.5px for the purpose, but this is [still far from enough](http://dieulot.net/css-retina-hairline), and is not semantic corrected in some cases ( device-pixel-ratio > 2). Various hacks have emerged, for example 

- [https://codepen.io/foolkai/pen/QEgzLm](https://codepen.io/foolkai/pen/QEgzLm)
- [https://juejin.im/entry/584e427361ff4b006cd22c7c](https://juejin.im/entry/584e427361ff4b006cd22c7c) (Chinese)

I suggest add a new CSS unit for this case, the uint name could be one of this following candidates:

- dpx: device pixel
- ppx: phisical pixel
- rpx: retina/real pixel

Thanks.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3715 using your GitHub account

Received on Thursday, 7 March 2019 09:41:40 UTC