- From: Noam Rosenthal via GitHub <sysbot+gh@w3.org>
- Date: Tue, 09 Apr 2024 08:59:03 +0000
- To: public-css-archive@w3.org
> I don't really like the idea of having extra syntax here specifically for view transitions. It can be used in the future for any other feature that uses idents. > I also don't like that selectors then suddenly have side effects. That's fair > ```css > section[--id: id] img.thumbnail { > view-transition-name: "thumb-" var(--id); > } > ``` > > could be : > > ```css > section[id]:has(img.thumbnail) { > --id: attr(id); > } > > section[id] img.thumbnail { > view-transition-name: "thumb-" var(--id); > } > ``` Yea, this was proposed as an alternative earlier in the thread. It's a bit more verbose, but I'm fine with it if we go down this more conservative path. > > sidetrack > I also can't help but feel that user should be able to use the full selector syntax to select view transition pseudo elements and that we are coming at this from the wrong angle. > > As I see it we actually want to have classes, attributes and id's on pseudo elements which is not possible because authors can add these in markdown. > > But what if we allow authors to push this information onto them? > > ```css > /* ignore the exact naming and syntax */ > .foo { > view-transition-id: "something-unqiue"; > view-transition-class: "class-a" "class-b" "class-d"; > view-transition-attributes: ["foo" "bar"] ["fooz" "baz"] > } > ``` We already have `view-transition-name` (unique) and `view-transition-class` (which is kind of like how you put it here). We can discuss having attributes as well but perhaps it's indeed a new issue. Determining the name by element is not about pseudo-elements, it's about matching the old and new states. -- GitHub Notification of comment by noamr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2044492890 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 9 April 2024 08:59:04 UTC