[css-animations-2] Make animation shorthand syntax future-proof
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading this issue together with the discussion in #6930 and the cited animation shorthand syntax note. Compare the proposed slash-separated and string-based alternatives, while checking that existing syntax remains supported; done requires an agreed future-proof syntax design rather than an implementation patch.
Written by the indexing model from the issue text.
Description
Splitting this from the discussion in #6930.
The animation shorthand property has this note regarding the interpretation of its syntax:
Note that order is also important within each animation definition for distinguishing
<keyframes-name>values from other keywords. When parsing, keywords that are valid for properties other thananimation-namewhose values were not found earlier in the shorthand must be accepted for those properties rather than foranimation-name. Furthermore, when serializing, default values of other properties must be output in at least the cases necessary to distinguish ananimation-namethat could be a value of another property, and may be output in additional cases.
So keywords are preferrably interpreted as values for longhand properties other than animation-name.
This comes with the big downside that no new keywords can be introduced without risking to break existing pages. This is, if a keyword is introduced that is currently used as a <keyframes-name> value, it will then be interpreted as the keyword for another longhand instead.
Therefore, I suggest to change the syntax of animation in a way that the animation-name value can always be clearly distinguished from the other values.
Two solutions that come to my mind are separating it by a slash or allowing to define it as a <string>.
Of course, the existing syntax still needs to be supported as well to avoid breaking the web. And the transition to a new one will take many years.
Though in order to allow extending the existing features or add new ones (like animation-composition) that are covered by the shorthand I believe this is a necessary change.
Sebastian
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from w3c/csswg-drafts
-
Agenda+ css-sizing-4 css-values-5
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
w3c/csswg-drafts#14502 · 1 reaction ·
-
css-values-5 editorial Needs Edits
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
w3c/csswg-drafts#14498 · 2 comments ·
-
css-overflow-4 topic: line-clamp
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
w3c/csswg-drafts#14485 · 1 comment ·
-
Administrative Tracker css-values-4
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
w3c/csswg-drafts#14482 · 4 comments · 1 reaction ·
-
css-values-5 Needs Edits
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
w3c/csswg-drafts#14466 ·
All issues in w3c/csswg-drafts
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bvaughn/react-resizable-panels#751 · 1 comment ·
-
www.wiwo.de OpenN: AdGuard Browser Extension P3: Medium T: Annoyance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AdguardTeam/AdguardFilters#242026 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100