Skip to content

feat: Add animation playback control utility classes (#1119)#1219

Merged
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
Sweksha-Kakkar:feat/animation-playback-control-1119
Jun 4, 2026
Merged

feat: Add animation playback control utility classes (#1119)#1219
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
Sweksha-Kakkar:feat/animation-playback-control-1119

Conversation

@Sweksha-Kakkar
Copy link
Copy Markdown
Contributor

Changes Made

Closes #1119

Problem:

The library lacked utility classes to control animation playback state dynamically (pause, resume, infinite loop).

What's changed in core/utilities.css:

Added a new "Animation Playback Control" section with these utility classes:

  • .motion-infinite — Sets animation-iteration-count: infinite
  • .motion-pause — Sets animation-play-state: paused
  • .motion-running — Sets animation-play-state: running
  • .hover-pause:hover — Pauses animation on hover
  • .hover-resume:hover — Resumes animation on hover
  • .focus-pause:focus — Pauses animation on focus (accessibility)
  • @media (prefers-reduced-motion) — Respects user's reduced motion preference

Usage Example:

<!-- Infinite loop -->
<div class="ease-fade-in motion-infinite">...</div>

<!-- Pause on hover -->
<div class="ease-bounce hover-pause">...</div>

<!-- Resume on hover -->
<div class="ease-pulse motion-pause hover-resume">...</div>

Checklist

  • I have read the CONTRIBUTING.md
  • My code follows the style guidelines of this project
  • I have tested my changes locally
  • This PR is linked to an issue
  • I have added a proper description of my changes

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

📊 CSS Bundle Size Benchmark

This PR changes the size of easemotion.min.css.

Metric Base Branch This PR Difference
Raw 39.16 KB 39.57 KB 📈 +0.40 KB
Gzip 7.16 KB 7.24 KB 📈 +0.08 KB
Brotli 6.19 KB 6.27 KB 📈 +0.08 KB

@Sweksha-Kakkar
Copy link
Copy Markdown
Contributor Author

@SAPTARSHI-coder
Please look into this and merge it.

@SAPTARSHI-coder SAPTARSHI-coder added accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) enhancement New feature or request good first issue Good for newcomers GSSoC-26 Official GSSoC 2026 issue gssoc:approved Approved for GSSoC contributions integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement labels Jun 4, 2026
@SAPTARSHI-coder SAPTARSHI-coder merged commit 2cbbaf8 into SAPTARSHI-coder:main Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) core enhancement New feature or request good first issue Good for newcomers gssoc:approved Approved for GSSoC contributions GSSoC-26 Official GSSoC 2026 issue integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add utility classes for animation playback control (Pause, Resume, Infinite states)

2 participants