{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-animation-performance-b5bd9492a7ad","title":"Optimize Animations with Transform and Opacity","summary":"Optimize animations by using transform and opacity to avoid layout recalculation and paint, resulting in smoother performance. This applies to stylesheet reviews, component transitions, and responsive animations.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-animation-performance-b5bd9492a7ad","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-animation-performance-b5bd9492a7ad","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-animation-performance-b5bd9492a7ad.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-animation-performance-b5bd9492a7ad\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the environment supports modern CSS features like will-change and GPU acceleration. Prepare by reviewing stylesheets for layout-triggering properties such as width, height, or margin before applying fixes.","instructions":"---\nname: animation-performance\ndescription: \"Use when reviewing stylesheets, component styles, and responsive behavior related to Use transform and opacity for animations. Check the rendered layout across breakpoints and interaction states before proposing a fix.\"\nmetadata:\n  category: css\n  priority: high\n  difficulty: intermediate\n  estimatedTime: \"20\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/css\/animation-performance\n---\n\n# Use transform and opacity for animations\n\nAnimating layout properties (width, height, top, margin) triggers the full browser rendering pipeline on every frame \u2014 style recalculation, layout, paint, and composite. This runs on the main thread and competes with JavaScript. Animating transform and opacity skips layout and paint entirely and runs on a dedicated GPU thread, achieving smooth 60fps even when the main thread is busy.\n\n## Quick Reference\n\n- Only transform and opacity can be composited on the GPU without triggering layout\n- Use will-change: transform sparingly to promote an element to its own compositor layer\n- Prefer CSS transitions and animations over JavaScript animation libraries for simple effects\n- Respect prefers-reduced-motion to disable animations for users who need it\n\n## Check\n\nFind CSS animations or transitions in this file that animate layout-triggering properties like top, left, width, height, or margin. Flag them for optimization.\n\n## Fix\n\nConvert layout-triggering animations to use transform equivalents: position changes to translate(), size changes to scale().\n\n## Explain\n\nExplain the browser rendering pipeline, why transform and opacity are performant for animation, and how the GPU compositor works.\n\n## Code Review\n\nReview stylesheets, component styles, and responsive states related to Use transform and opacity for animations. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/css\/animation-performance\n","use_cases":["Reviewing stylesheets for layout-triggering animations","Improving performance of responsive component transitions","Ensuring animations are compatible with reduced motion preferences"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/animation-performance\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-23","created_at":"2026-11-22T15:06:11.000000Z","updated_at":"2026-11-23T04:54:44.000000Z","seo_title":"Optimize animations with transform and opacity","seo_description":"Learn how to optimize animations by using transform and opacity to avoid layout recalculation and paint for smoother performance.","seo_keywords":["optimize animations","transform and opacity animation","reduce layout recalculation","improve animation performance"]}}