[csswg-drafts] Pull Request: Add support for device-pixel-border-box-size #3554

dlibby- has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== Add support for device-pixel-border-box-size #3554  ==
Minutes: https://github.com/w3c/csswg-drafts/issues/3554#issuecomment-540086408

Authors need a way to get the border box size in integral physical pixels. This allows for the correct sizing of the backing store of a canvas to match the snapped CSS size and prevents moire patterns that arise when the sizes are mismatched. 

Currently authors could use devicePixelRatio and rounding in order to approximate this, but due to implementation differences in pixel snapping, can still get the wrong answer. Additionally, this can be affected by position changes which authors cannot currently hook into in a reasonable manner.

See https://github.com/w3c/csswg-drafts/pull/4476

Received on Thursday, 31 October 2019 16:56:39 UTC