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

Documenting a couple of syntax ideas below for this:

- A new `view-transition-class` CSS property paired with a new pseudo-class for targeting the pseudo-elements.

   ```css
      .item {
          view-transition-class: item, song;
          view-transition-name: song;
      }
      
      /* view-transition-class applies if any of the idents match the corresponding view-transition-class */
      html::view-transition-group(*):view-transition-class(item, artist) {
            ...
      }
      ```
- Expand on `view-transition-name` and existing pseudo-element syntax.

   ```css
      .item {
          /* The set of names must be unique and used for element matching. */
          view-transition-name: song, item;
      }
      
      /* Matches if any of the idents match the corresponding view-transition-name */
      html::view-transition-group(song, artist) {
            ...
      }
      ```

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


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

Received on Wednesday, 11 October 2023 16:28:40 UTC