Re: [csswg-drafts] [css2?] Define when border rounding happens, and to which properties it applies (#5210)

A few thoughts on a spec definition for this:

Given that it applies to multiple properties (I think `border-*-width`, `outline-width`, and `column-rule-width`), you want to have a definition in one place that can be referenced by the definitions of all three properties.  So I'd suggest something like:

> To <b>snap a length as a border width</b> means to convert that length (presumed to already be nonnegative) as follows:
> - if the length is greater than 0 and less than 1 [device pixel](https://drafts.csswg.org/css-values-4/#device-pixel), it should be rounded up to 1 device pixel;
> - if the length is greater than 1 device pixel, it should be rounded down to the nearest integer number of device pixels.

Given a definition like that, the "Computed value" lines could then say something like "absolute length, snapped as a border width" where "snapped as a border width" links to the above definition.

-- 
GitHub Notification of comment by dbaron
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5210#issuecomment-1292794138 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 27 October 2022 00:09:28 UTC