--- name: responsive-design description: Mobile-first responsive design, breakpoints, touch targets, and adaptive layouts. Use when building layouts, creating responsive components, or optimizing for mobile. version: 1.0.0 --- # Responsive Design This skill covers responsive design principles — mobile-first development, appropriate breakpoints, touch-friendly targets, and adaptive layout patterns. ## Use-When This skill activates when: - Agent builds page layouts or components - Agent adds responsive breakpoints - Agent designs for mobile devices - Agent creates touch-friendly interactions - Agent converts desktop-only designs to responsive ## Core Rules - ALWAYS use mobile-first approach (base styles for mobile, media queries for larger) - ALWAYS ensure touch targets are at least 44x44px - ALWAYS design for smallest screen first, then enhance - NEVER rely solely on device detection (use feature detection) - ALWAYS test at actual breakpoints, not just resize the browser ## Common Agent Mistakes - Desktop-first approach leading to mobile afterthought - Touch targets too small (buttons, links under 44px) - Fixed widths that break on smaller screens - Not considering landscape orientation on mobile - Hiding content instead of adapting it ## Examples ### ✅ Correct ```tsx // Mobile-first: base styles for mobile, enhance for larger