Re: [csswg-drafts] [css-view-transitions-2] Creating 'classes' of transition groups (#8319)

> > * Potential syntax for the selector:
> > 
> > ```css
> > 1. ::view-transition-group(*.class1.class2)
> > 2. ::view-transition-group(*).class1.class2
> > 3. ::view-transition-group(* of class1 class2)
> > 4. ::view-transition-group(* / class1 class2)
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > Some arguments:
> > 
> > * (2) might be extendible to more generic pseudo-element classes in the future. However it feels like it would work with regular selectors (e.g. `.class1`).
> 
> I like the options where the class goes in the pseudo better. The `view-transition-name` also goes into the pseudo after all
> 
> > * (3) seems awkward when there is more than 1 class?
> 
> The “regular” `of` syntax in `nth-*` uses commas to separate the values. E.g. `::view-transition-group(* of class1, class2)`

That would have *any* semantics (in this case, either class1 or class2 would be selected).

> 
> > * (4) it's not obvious whether it's `name/class` or `class/name`
> 
> What I like about this syntax is that it would be (almost*) identical to what you type as a value for the [proposed shorthand](https://github.com/w3c/csswg-drafts/issues/8319#issuecomment-1828514262): first the v-t-name and then the v-t-class(es). This should be the same here, so you’re good once you know it.
> 
> (*) only difference is that you need to replace `auto` from the shorthand by `*` in the pseudos when you only care about the v-t-classes.

Yea but we could also change the shorthand proposal to match what we decide here, e.g. `name.class.class` instead of `name / class class`

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


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

Received on Wednesday, 13 December 2023 10:08:03 UTC