- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Tue, 05 Nov 2024 10:58:36 +0000
- To: public-css-archive@w3.org
bramus has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-view-transitions-2] Access to custom properties from within the pseudos ==
Something I see a lot of authors try to do – and fail at – is access custom properties of the original element from within the `::view-transition-*` pseudos. See https://frontendmasters.com/blog/view-transitions-staggering/#but-does-that-actually-help-us for a recent example of this.
```css
#items > * {
  view-transition-class: item;
  --index: sibling-index();
}
::view-transition-group(*.item) {
  animation-delay: calc(var(--index) * 0.02s);
}
```
Maybe we can have the `::view-transition-group` pseudo gain access to the custom properties from the original element somehow?
Maybe by copying over the custom props in layered capture mode (which I can imagine would be slow when there are a ton of custom properties)?
Or maybe by defining their lookup mechanism (cfr. highlight pseudos), which I guess would be faster?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11153 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 5 November 2024 10:58:37 UTC