[csswg-drafts] [css-view-transitions-1] Support for globs on ::view-transition pseudo selector (#10164)

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

== [css-view-transitions-1] Support for globs on ::view-transition pseudo selector ==
Link to the spec section I'm talking about
(https://www.w3.org/TR/css-view-transitions-1/#pseudo)

Currently pseudo-selectors `::view-transition-old` and `::view-transition-new` follow the syntax: `::pseudo(<pt-name-selector>)`

where `<pt-name-selector>` can be:
 * \*
 * root
 * custom identifier

I think it would be extremely useful to be able to write:

```
::pseudo(card-*)
```

with the intent of applying some style to all elements with `view-transition-name` that starts with `card-`.

This would be especially useful when you work with frameworks where it is easy to assign `vew-transition-name`s dynamically, as for example in:

```html
<img
  [src]="card.imageUri"
  [style.view-transition-name]="id | prepend : 'card-'"
/>
```

Dyanimc `view-transition-name` has the clear advantage of alleviating devs from the need of interloping in the route change process and imperatively swap the view transition names. However, by doing so you lose the ability of applying some style to a specific group of logically connected animations



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


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

Received on Monday, 1 April 2024 14:23:38 UTC