- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Tue, 25 Mar 2025 16:02:39 +0000
- To: public-css-archive@w3.org
+1 on this, as per our internal discussion. This came to my attention when debugging https://cdpn.io/pen/debug/EaxpWyg/6639b89cea4958859d285316ad963a8f which uses `view-transition-name: match-element`.  While the name of the pseudo is obfuscated in `animation.effect.pseudoElement` _(as per [previous resolution](https://github.com/w3c/csswg-drafts/issues/10978#issuecomment-2447608159))_, the generated name is leaking from various other places: 1. The tree in DevTools shows those generated names. 2. The generated UA stylesheet uses those generated names to target the pseudos. 3. The names are exposed through the generated animation-name values. While DevTools could be adjusted to also expose `match-element` here (fixing 1), issue 2 and 3 can only be fixed by decoupling the generated animation name from the generated pseudo name and then doing some internal mapping. I don’t think that the “fix for issues 2 and 3 would be helpful to authors, as it would result in the obfuscation becoming more of a hurdle than a feature: 1. Currently some authors are actively relying on there being a link between the generated animation name and the generated pseudo name. They use this to add extra animations, overwrite the generated keyframes for performance reasons, to derive the presence of pseudos without accessing the animation effect to read the name, or to do a `getComputedStyle` on a pseudo to read styles from it. 2. When further obfuscating, authors could still derive things by doing all sorts of crazy things: loop all animations, read their keyframes, get the matching pseudos based on the keyframes’ name, then get those pseudos their top/left values, and then try to match that with the all captured elements to find which one is which – I don’t think we want to push authors into that direction. The easiest and most author-friendly solution is to revert the decision to obfuscate the generated name in the animation’s `pseudoElement`. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12004#issuecomment-2751767904 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 25 March 2025 16:02:41 UTC