Re: [csswg-drafts] [css-view-transitions-2] Allow an auto-generated `view-transition-name` that doesn't default to ID (#10995)

> To be clear, I'm happy with spec'ing and shipping match-element, but I'm not sure about supporting attr(id, match-element) because it would mean match-element generates an actual observable name, or alternatively that attr would have a special behavior as a view-transition-name value.

This is fine; `attr()` is morally equivalent to a `var()` that just fetches from an attribute instead of a custom property. So in the case of substitution failure ("id" attribute doesn't exist), the fallback just acts like it was what was specified instead.

(Tho, unless we specify that strings are allowed in 'view-transition-name', you'll have to spell it `attr(id type(<ident>), match-element)`, or at least `attr(id type(*), match-element)` if you're okay with a non-ident ID just making the property invalid (this should be rare anyway).)

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


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

Received on Friday, 22 November 2024 20:06:52 UTC