Skip to content

feat: add opt-in logical keyframes and animation references - #3

Merged
oe merged 9 commits into
mainfrom
feat/logical-keyframes
Oct 3, 2026
Merged

oe merged 9 commits into
mainfrom
feat/logical-keyframes

Conversation

@oe

@oe oe commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Logical keyframes currently remain uncompiled, so physical-property fallback styles cannot animate those properties in older browsers. Add animations: true to generate distinct LTR and RTL copies of referenced logical keyframes and rewrite static animation-name and animation shorthand references. The option defaults to false; existing default behavior and other options remain unchanged.

Parse shorthand roles before selecting animation names, including scientific-notation durations, negative delays, keyword names, quoted/escaped names and multiple animations. Avoid naming collisions, preserve original definitions, clone every same-name definition in its original conditional context, support prefixed declarations/definitions, and preserve shorthand/longhand resets and importance. Reprocessing serialized output is idempotent. Dynamic references remain unchanged with a warning; inline imports and expand nesting before this plugin.

Add a runnable direction-toggle example, README/API/configuration documentation and packed-consumer checks for the new option. Allow CI for stacked PR bases while keeping documentation deployment restricted to main.

This change builds on #2, which was merged first. It adds no third-party runtime dependency and contains independently written code. Released in v0.7.1.

Validation:

  • 453 tests pass, including 24 animation cases and 23 transition-property cases.
  • 162 browser cascade comparisons, 32 real transition timing comparisons and 26 native/compiled animation intermediate-frame comparisons pass.
  • The runnable example switches active keyframes between LTR and RTL.
  • Types, library/documentation builds and packed CommonJS/ES module/TypeScript consumers pass.

Release review also verifies literal backslashes do not alias hexadecimal escapes in quoted animation names. Packed consumers pass on Node.js 20.19.0 and 22.

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.91304% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.22%. Comparing base (d90017c) to head (3731fc6).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/animations.ts 98.82% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   98.06%   98.22%   +0.16%     
==========================================
  Files           7        8       +1     
  Lines         722      900     +178     
  Branches      220      305      +85     
==========================================
+ Hits          708      884     +176     
- Misses         14       16       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oe
oe changed the base branch from feat/transition-property to main October 3, 2026 13:11
@oe
oe merged commit 790119c into main Oct 3, 2026
5 checks 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.

1 participant