Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web-animations-2] Use dfn type for animation trigger values #11664

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Feb 6, 2025

The values for "animation trigger state" and "animation trigger type" were defined with a value definition type. That type is reserved for CSS values: https://speced.github.io/bikeshed/#dfn-types

This makes tools that crawl specs to extract machine-readable information wrongly assume that the spec introduces new CSS values.

There is no specific definition type available for generic values. This update uses a regular dfn and updates references to these values accordingly.

The values for "animation trigger state" and "animation trigger type" were
defined with a `value` definition type. That type is reserved for CSS values:
https://speced.github.io/bikeshed/#dfn-types

This makes tools that crawl specs to extract machine-readable information
wrongly assume that the spec introduces new CSS values.

There is no specific definition type available for generic values. This update
uses a regular `dfn` and updates references to these values accordingly.
@tidoust tidoust requested a review from ydaniv February 6, 2025 15:24
@ydaniv
Copy link
Contributor

ydaniv commented Feb 6, 2025

Thanks for opening this PR! Regarding state, I think correct the dfn to a simple one and not value was the thing I was missing, good catch!
Regarding type, it's actually a value: https://drafts.csswg.org/css-animations-2/#animation-trigger-type
So these should probably remain as values?

Per feedback, the values are indeed CSS values for the `animation-trigger-type`
property defined in CSS Animations 2. This update replaces the definitions in
web-animations-2 by references to the definitions in CSS Animations 2 not to
end up with two places that define the values.
@tidoust
Copy link
Member Author

tidoust commented Feb 6, 2025

Regarding type, it's actually a value: https://drafts.csswg.org/css-animations-2/#animation-trigger-type
So these should probably remain as values?

Ah, sorry, I had missed that, indeed! There should be only one normative definition of anything, so if css-animations-2 defines the values, web-animations-2 should reference them and not attempt to re-define them. I pushed a new commit that replaces the <dfn> tags with references to the values in css-animations-2.

@ydaniv
Copy link
Contributor

ydaniv commented Feb 7, 2025

@tidoust thanks! LGTM.

so if css-animations-2 defines the values, web-animations-2 should reference them and not attempt to re-define them.

In css-animations-2 we have a more user-facing definition which describes the behavior of each type for authors.
In web-animations-2 we have a more implementor-facing definition which describes the behavior of each type for implementors.
See @flackr's comment here.

@ydaniv ydaniv merged commit 07e98f6 into w3c:main Feb 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants