agentsclimarketplace

Css animations

Skill Amey-Thakur/AI-SKILLS/skills/css-styling/css-animations

Animate with compositor-friendly properties, honest durations, and reduced-motion fallbacks. Use when adding UI motion or fixing janky, battery-hungry animations.From its SKILL.md

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill css-animations

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.7 KB, 581 tokens by cl100k_base, as published. Nobody here has run it

CSS animations

Motion should explain state change, then get out of the way. Everything here follows from one budget: 16ms per frame, spent off the main thread whenever possible.

Method

  1. Animate transform and opacity; treat everything else as suspect. Those two run on the compositor without layout or paint. Animating width, height, top/left, or box-shadow re-lays-out every frame; fake size with transform: scale, movement with translate, shadows by cross-fading a pre-rendered layer.
  2. Keep durations honest. 100-200ms for hover and small state flips, 200-300ms for panel and route transitions, 400ms+ only for hero moments. Ease-out for entrances (fast start, settle), ease-in for exits, never linear except for continuous spinners and progress.
  3. Transition state, keyframe choreography. transition on the property for A-to-B state changes driven by class or attribute flips; @keyframes for multi-step or looping motion. Toggle animations by changing animation-play-state or a class, not by rebuilding the element.
  4. Use FLIP for layout moves. To animate an element between two layout positions: record First rect, apply the end state, compute the delta, apply it inverted as a transform, then transition the transform to none. Layout happens once; motion stays on the compositor. The View Transitions API (document.startViewTransition) does this for whole DOM updates, including cross-page in supporting browsers.
  5. Respect reduced motion structurally. Wrap motion in @media (prefers-reduced-motion: no-preference) so stillness is the default. Under reduced motion keep opacity fades; remove movement, parallax, and autoplaying loops. This is a vestibular-safety feature, not a polish preference.
  6. Verify on the profiler, not the eyeball. Devtools performance panel: look for purple (layout) inside the animation frames, and check the same interaction on a throttled CPU. will-change is a targeted hint applied just before animating and removed after; declared permanently it wastes memory.

Boundaries

  • Scroll-driven effects belong to animation-timeline: scroll() or the scroll-linked APIs, not scroll event handlers mutating styles.
  • SVG path morphing and physics-feel springs exceed CSS; that is Web Animations API or a motion library territory.
  • If motion carries information (what moved where), reduced-motion users still need that information by another channel.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.