W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

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

From: Daniel Libby via GitHub <sysbot+gh@w3.org>
Date: Thu, 31 Oct 2019 16:56:36 +0000
To: public-css-archive@w3.org
Message-ID: <pull_request.opened-335028809-1572540995-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:55 UTC