[animation-triggers-1] Add custom triggers
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- css, javascript
- Domain
- web-dev
Research direction
Start with the linked animation-triggers specification and the Web Animations definition of “current”; compare the proposed CustomTrigger API with timeline and event triggers. Done means resolving whether the trigger is stateful and defining its activation and associated-animation semantics clearly enough for the specification.
Written by the indexing model from the issue text.
Description
The animation-triggers-1 spec currently explains how timeline and event triggers should work. I think that custom triggers is another useful variant that requires little additional api surface and has been requested for some use cases. In particular, you could do the following:
// Create a trigger.
const myTrigger = new CustomTrigger();
// Create as many associated animations as you like.
myTrigger.addAnimation(element.animate({ ... }, { ... }, 'play');
myTrigger.addAnimation(element.animate({ ... }, { ... }, 'play');
// Sometime later, the associated animations can be triggered:
myTrigger.activate();
Open questions:
- Should it be stateful, i.e. enter an activated and deactivated state like timeline triggers, or like event triggers where it does not stay in an activated state and merely triggers the activation behavior. I'm leaning towards non-stateful.
Why is this useful?
The developer can pre-arm important animations ahead of time without knowing exactly when they need to play. The browser can be ready to perform the specific declared animation with minimal delay when it is time to play it. E.g. composited browser could have already created the associated layers and properties. I think this is something we couldn't do with regular animations as unlike regular animations, these would be considered current similar to other triggered animations.
- 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