[css-animations] or [css-selectors] Abiliity to invoke an animation on the "exit" of a state selector
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- css
- Domain
- frontend
Research direction
Start with the linked Open-UI popover=hint proposal and the CodePen example, then review the discussion about using animation-delay with :hover and :focus-within. Determine whether transitions can reproduce the exit behavior; if not, clarify a viable CSS mechanism for animations when a state selector is left.
Written by the indexing model from the issue text.
Description
The Open-UI WG proposal on popover=hint includes two new CSS properties: popover-show-delay and popover-hide-delay. These are designed to allow a debouncing delay for showing and hiding a tooltip-style popover.
In the discussion, I claimed that popover-show-delay is replicable today using animation-delay. I have an example codepen which demonstrates the effect by using :hover and :focus-within to set an animation, with an animation-delay. This, as I understand it, negates the need for a popover-show-delay, however I can't find a way within CSS to trigger an animation when a CSS state is "exited".
Transitions might be the answer, but I can't figure out how to make the same effect with transitions. If someone can I'm happy to close this issue out!
If it's not possible with transitions, perhaps one way to resolve this is to add properties which allow defining an animation for when an element leaves a state. This might look like adding exit-animation-* for each animation-* property.
Another proposal would be to add stateful selectors such as :hover-out, :focus-leave, :focus-within-leave. These could apply to elements that were recently in their respective states, but have "recently" left. I suppose the mechanics for this would need to reason about how long these states apply for, based on the duration of any animation properties applied to them?
- 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