Re: [csswg-drafts] [css-view-transitions-2] view-transition-name determined by element (#8320)

> Whichever method we land on here, I would like to call out that we would need the `ident()` function from #9141 when dynamically constructing an ident.
> 
> It might not be relevant for `view-transition-name`, but would be for other properties, specifically shorthands.
> 
> Cross-posting [this comment](https://github.com/w3c/csswg-drafts/issues/9141#issuecomment-2044615510) from #9141 to clarify:
> 
> > Parsing purposes. Think of shorthands, such as `scroll-timeline`.
> > With `ident()`:
> > 
> > * `scroll-timeline: inline ident("tl-" var(--id))`
> > * `scroll-timeline: ident("tl-" var(--id)) inline`
> > 
> > Without `ident()`:
> > 
> > * `scroll-timeline: inline "tl-" var(--id)`
> > * `scroll-timeline: "tl-" var(--id) inline`
> 
> If `--id` in that example were `block`, you’d end up with `scroll-timeline: inline "tl-" block` when not using the `ident()` function. I don’t think the parser would like that 😅 (nor would I, as an author trying to read the code).

I wonder if we can solve this for particular shorthands rather than add avoidable verbosity to `view-transition-name`.

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


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

Received on Tuesday, 9 April 2024 10:15:01 UTC