[csswg-drafts] [scroll-animations-1] `scroll-timeline` and `view-timeline` shorthand syntax (#7627)

bramus has just created a new issue for https://github.com/w3c/csswg-drafts:

== [scroll-animations-1] `scroll-timeline` and `view-timeline` shorthand syntax ==
The syntax for [the `scroll-timeline` shorthand](https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-shorthand) is defined as such:

```css
scroll-timeline: <'scroll-timeline-axis'> || <'scroll-timeline-name'>
```

The syntax for [the `view-timeline` shorthand](https://drafts.csswg.org/scroll-animations-1/#view-timeline-shorthand) is defined as such:

```css
view-timeline: [<'view-timeline-name'> || <'view-timeline-axis'>]#
```

It’s odd that the `scroll-timeline` has the name mentioned first, while in `view-timeline` it is the axis. Even though the order of both does not matter – due to `||` – I would like to see these listed in the same order for consistency reasons.

---

Going further, maybe we should disallow reordering the values? There is precedent to have the `*-name` first: [the `container` shorthand](https://www.w3.org/TR/css-contain-3/#propdef-container) has the `container-name` first and then the `container-type`.

```css
container: <'container-name'> [ / <'container-type'> ]?
```

Maybe we can update the `scroll-timeline` and `view-timeline` shorthands to follow the form of the `container` shorthand? Like so:

```css
scroll-timeline: <'scroll-timeline-name'> [ / <'scroll-timeline-axis'> ]?
```
```css
view-timeline: [<'view-timeline-name'> [ / <'view-timeline-axis'> ]?]#
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7627 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 19 August 2022 10:14:21 UTC