Re: [csswg-drafts] [css-values-4] `round(line-width, ...)` specification is confusing (#13794)

I do not know if the new version of the snapping algo returns a positive value from a negative value:

  > 2. If the absolute value of `len` is greater than zero, but less than 1 device pixel,
  >    round it away from zero to 1 device pixel.
  > 4. If the absolute value of `len` is greater than 1 device pixel,
  >    round it towards zero to the nearest integer number of device pixels.

Was the intention the following?

  > To snap a length as a line width given a `<length>` `len`:
  >
  > 1. If `len` is an integer number of divce pixels, do nothing.
  > 2. If the absolute value of `len` is greater than zero, but less than 1 device pixel,
  >    round `len` down to -1 device pixel if it is negative,
  >    otherwise round `len` up to 1 device pixel.
  > 3. If the absolute value of `len` is greater than 1 device pixel,
  >    round `len` down to the nearest integer number of device pixels if it is negative,
  >    otherwise round `len` up to the nearest integer number of device pixels.

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


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

Received on Saturday, 9 May 2026 11:49:43 UTC