- From: Noam Rosenthal via GitHub <sysbot+gh@w3.org>
- Date: Mon, 11 Dec 2023 07:06:29 +0000
- To: public-css-archive@w3.org
> > I wouldn't call `header > *` or `nav > a` or even section:has(a:active) an uncommon use-case.
>
>
>
> Agreed. I was talking more specifically about cases where you don't have access to markup and only have access to CSS as being the uncommon use-case. I think a lot of devs use `header > *` or `nav > a` for convenience and not because they can't change the HTML.
>
>
>
> ---
>
>
>
> There are clearly a bunch of intricacies here, so I want to say that anything we discussed would be a huge improvement and overall acceptable. The repetition here is acceptable:
>
>
>
> ```css
>
> .box {
>
> view-transition-class: box;
>
> }
>
> ::view-transition-group(* of box) {
>
> ...
>
> }
>
> ```
>
>
>
> ----
>
>
>
> The problem at the moment is that
>
> - transition names need to be unique
>
> - So it usually makes sense to generate them (with `useId` in React for example)
>
> - This means `::view-transition-group` styles can't be defined statically
>
>
>
> The `view-transition-class` property would solve the problem.
>
It doesn't yet, but it lays the foundation for it.
>
>
> ----
>
>
>
> I think based on the discussion above, it is clear that `view-transition-class` property will always be needed for some use-cases, so the argument can be made that we should choose just one more flexible way to do things, rather than adding a bunch of APIs for convenience.
I think the more simplified way you proposed can be a great feature for a CSS utility framework or preprocessor. Think of a scss mixin that automatically creates vt-classes based on ordinary id/class.
--
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8319#issuecomment-1849441767 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 11 December 2023 07:06:31 UTC