enhancing-progressively
CSS-first approach - use CSS before JavaScript. Triggers: レイアウト, スタイル, 位置, アニメーション, 表示/非表示, トグル, レスポンシブ, CSS Grid, Flexbox, transforms, transitions, CSSのみ, JavaScript不要, シンプル
When & Why to Use This Skill
The 'enhancing-progressively' skill implements a CSS-first architectural philosophy for web development, prioritizing native browser capabilities over JavaScript. By leveraging modern CSS features like Grid, Flexbox, and the :has() selector, it minimizes code complexity, enhances web performance, and ensures robust, accessible user interfaces that follow the principle of Progressive Enhancement.
Use Cases
- Building responsive layouts and complex positioning using CSS Grid and Flexbox to eliminate unnecessary window resize listeners in JavaScript.
- Implementing interactive UI components such as mobile menus, toggles, and tooltips using pure CSS techniques to reduce the bundle size and improve TTI (Time to Interactive).
- Creating high-performance animations and state transitions using CSS transforms and transitions for smoother rendering and lower CPU overhead.
- Auditing existing front-end codebases to refactor heavy JS-driven logic into lightweight, maintainable CSS-only solutions.
- Designing accessible and resilient web pages that remain functional even in environments where JavaScript is disabled or fails to load.
| name | enhancing-progressively |
|---|---|
| description | > |
| CSS-first approach - use CSS before JavaScript. Triggers | レイアウト, スタイル, |
| allowed-tools | Read, Write, Edit, Grep, Glob |
Progressive Enhancement
Purpose
Prefer CSS solutions over JavaScript. "The best code is no code."
Quick Decision
Before writing JS, ask:
- "Can CSS solve this?" → Grid, Flexbox, :has(), transforms
- "Is this needed now?" (YAGNI) → No evidence = don't implement
- "Simplest solution?" (Occam's Razor) → 3 lines CSS > 50 lines JS
Reference
For detailed guide, see: @~/.claude/rules/development/PROGRESSIVE_ENHANCEMENT.md
Related
applying-code-principles- SOLID, DRY, Occam's Razoroptimizing-performance- Performance optimization
Used by
/code --frontend- Frontend implementation/audit- CSS-first approach verification