Re: [csswg-drafts] [css-animations-2] Set `animation-trigger-type` as the coordinating list base property (#11653)

  > Well `animation-trigger` is a longhand that can't be specified in the `animation` shorthand [...]. Exactly like `animation-timeline`.

`animation-timeline` can be specified in `animation`.

Anyway, part of my confusion was that `animation-trigger` seems to be the first coordinating list property that cannot be specified in the same shorthand than the other properties of the same coordinating list property group.¹

  > I don't think other longhands get truncated if you specify more values in the list than specified animation names. So I guess this should behave the same.

The other part is that I thought that a coordinating list shorthand property should have its specified value serialized to empty string if the coordinating list base property has a different number of values than some property in the same group, indicating that it cannot represent all its longhands yet.

This is what FF does. Chrome truncates/repeats specified values as needed, which is incorrect because the spec requires this only for computed values:

  > The computed values of the coordinating list properties are not affected by such truncation or repetition.

So in the example in my previous comment, the used value of `animation-trigger` should be truncated (based on `animation-name`, declared via `animation`). I do not know how FF will serialize its specified value.

---

(nit)

The emphasized part of [this paragraph](https://drafts.csswg.org/css-animations-2/#animation-definition) should probably exclude `animation-trigger`:

  > CSS Animations are defined by binding keyframes to an element using the `animation-*` properties. **These list-valued properties, which are all longhands of the `animation` shorthand**, form a coordinating list property group with `animation-name` as the coordinating list base property and each item in the coordinated value list defining the properties of a single animation effect.

<details>
  <summary>¹ as far as I know, all existing coordinating list properties are mapped by one of these shorthands:</summary>

  - `animation`
  - `animation-range` (not explicitly defined)
  - `background`
  - `box-shadow`
  - `mask` (not explicitly defined)
  - `text-shadow` (not explicitly defined)
  - `transition` (not explicitly defined)
  - `scroll-timeline`
  - `view-timeline`

</details>

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/11653#issuecomment-2636906081 using your GitHub account


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

Received on Wednesday, 5 February 2025 13:49:34 UTC