- From: Tim Nguyen via GitHub <sysbot+gh@w3.org>
- Date: Sun, 26 Nov 2023 22:28:22 +0000
- To: public-css-archive@w3.org
I find it unfortunate to see the multiplication of concepts to grasp that are similar but not identical: classes / names / types.
I wonder if it would be possible to abstract classes behind names by making `view-transition-name` a shorthand.
Full syntax:
```
view-transition-name: none | [<class>+ / <id>] | <class>+ | <id>;
view-transition-names: none | <class>+;
view-transition-identifier: none | auto | <id>;
```
Example:
```
view-transition-names: name-1 name-2;
view-transition-identifier: auto; // generate an ID for this view transition
```
And the short syntax would be:
```
view-transition-name: name-1 name-2;
```
You would use it as:
```
::view-transition-group(name-1) {
}
```
which would match all elements with the name-1 ID or name.
The idea is that developers can just use names / classes interchangeably.
I'm tempted to only allow selecting with a single "class", since view transition "types" kind of cover the use case of using multiple classes, but if you were to select for multiple classes, this would be possible:
```
::view-transition-group(name-1 name-2) {
}
```
This would match:
- something with the class `name-1` and the class `name-2`
- something with the ID `name-1 ` and the class `name-2`
- something with the ID `name-2` and the class `name-1`
--
GitHub Notification of comment by nt1m
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8319#issuecomment-1826915590 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 26 November 2023 22:28:24 UTC