[csswg-drafts] Is <attr-unit> parse-time behavior intentional? (#13060)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== Is <attr-unit> parse-time behavior intentional? ==
Per [spec](https://drafts.csswg.org/css-values-5/#typedef-attr-unit), getting a wrong `<attr-unit>` causes the whole declaration to be invalid:

```css
div {
  width: 100px;
  height: attr(foo cool-new-unit, 100px);
}
```
  

That's probably fine but is it intentional?

It feels a bit weird that `attr(foo cool-new-unit, fallback)` wouldn't use the fallback (or trigger IACVT).

I could see arguments the other way around I guess? But feels a bit like `env(something-random)` to me, which does trigger fallback / doesn't validate the identifier.

cc @dshin-moz @tabatkins @andruud 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13060 using your GitHub account


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

Received on Tuesday, 4 November 2025 22:05:39 UTC