Re: [csswg-drafts] [css-values-3] attribute reference attr() length with a '0' value (#6244)

In [§5 Distance Units: the `<length>` type](https://www.w3.org/TR/css-values-3/#lengths), we can read
"
For zero lengths the unit identifier is optional (i.e. can be syntactically represented as the `<number>` 0). However, if a 0 could be parsed as either a `<number>` or a `<length>` in a property (such as line-height), it must parse as a `<number>`.
"

In [§8.2 Attribute References: attr()](https://www.w3.org/TR/css-values-3/#attr-notation) we can read
"
The optional `<type-or-unit>` argument is a keyword drawn from the list below that tells the UA how to interpret the attribute value
"

If all this is coherent and consequent, then I think that 
[attr-length-valid-zero-nofallback.html test](http://wpt.live/css/css-values/attr-length-valid-zero-nofallback.html) is incorrect while 
[attr-invalid-type-002.html test](http://wpt.live/css/css-values/attr-invalid-type-002.html) is correct.

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


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

Received on Thursday, 29 April 2021 17:56:15 UTC