协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
animation-performance在审查样式表、组件样式和响应式行为时使用,涉及对动画使用 transform 和 opacity。建议在提出修复方案前检查跨断点和交互状态的渲染布局。
AI 翻译
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Animating layout properties (width, height, top, margin) triggers the full browser rendering pipeline on every frame — 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.
Find CSS animations or transitions in this file that animate layout-triggering properties like top, left, width, height, or margin. Flag them for optimization.
Convert layout-triggering animations to use transform equivalents: position changes to translate(), size changes to scale().
Explain the browser rendering pipeline, why transform and opacity are performant for animation, and how the GPU compositor works.
Review 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.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/animation-performance