mcpField
C
css-animations

css-animations

github.com/editframeCreative & media1982 installsUpdated 2w ago
Repository

About css-animations

A reference skill for writing CSS animations in Editframe compositions. It explains when to set animation fill modes so timeline-controlled animations display correctly, and how to interpret development warnings.

Key features

  1. 01Fill-mode guidance for ef-text
  2. 02Entry and exit animation patterns
  3. 03Combined entrance and exit patterns
  4. 04Development warning explanations
  5. 05Animation fill-mode reference

Use cases

  1. 01Add delayed text animations
  2. 02Prevent elements flashing during playback
  3. 03Keep exit styles after animations end

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/editframe/skills --skill css-animations

After installing, type/css-animationsin Claude Code to confirm it loaded.

Details

From the project README

CSS Animations in Editframe

Editframe's timeline system pauses animations and manually controls them via animation.currentTime. Elements exist in the DOM before their animations start, so fill-mode matters.

ef-text and ef-text-segment — fill-mode is automatic

For text animations on ef-text or via ef-text-segment classes, do not set fill-mode. The system defaults to backwards automatically when the computed value is none.

/* ✅ Just write the animation — fill-mode is handled */
ef-text {
  animation: fade-in 1s 500ms;
}

.my-segment-class {
  animation: slide-up 800ms var(--ef-stagger-offset);
}

Only override if you have a reason:

/* Explicit exit animation that needs forwards */
.my-segment-class {
  animation: fade-out 500ms forwards;
}

Other elements — fill-mode is still required

For plain HTML elements inside a composition (divs, h1s, etc.), you must still set fill-mode explicitly.

Entry animations → backwards
/* ❌ Element shows natural state during delay */
animation: fade-in 1s 500ms;

/* ✅ Holds initial keyframe during delay */
animation: fade-in 1s 500ms backwards;
Exit animations → forwards
/* ❌ Element snaps back after fading out */
animation: fade-out 500ms;

/* ✅ Holds final keyframe after animation ends */
animation: fade-out 500ms forwards;
Combined entrance + exit → both
animation:
  fade-in 1s backwards,
  fade-out 500ms calc(var(--ef-duration) - 500ms) forwards;

/* or */
animation: fade-in-out 2s both;

Development Mode Validation

The system warns in the browser console about missing fill-mode on any element:

🎬 Editframe Animation Fill-Mode Warning
⚠️  Animation "fade-in" has a 500ms delay but no 'backwards' fill-mode.
   Fix: Add 'backwards' or 'both' to the animation shorthand.

Technical Background

  • none (default): No styles applied before/after animation
  • forwards: Final keyframe styles persist after animation ends
  • backwards: Initial keyframe styles applied before animation starts (covers delays)
  • both: Combination

Editframe controls animation.currentTime directly. Without fill-mode, browsers apply natural element styles instead of keyframe styles, causing visible "flashing."

Resources

Comments

Markdown supported