Build Responsive Layout
Mobile-first workflow for creating responsive interfaces
CLAUDE.md
When building a responsive layout:
- Start with the mobile layout. Design for the smallest screen first.
- Build the HTML structure with semantic elements. Get the content flow right before adding any layout CSS.
- Add CSS for the mobile view using single-column layout and full-width elements.
- Add breakpoints with min-width media queries to progressively enhance for larger screens.
- Use relative units (rem, %, vw) instead of fixed pixel values.
- Test at common breakpoints: 375px (phone), 768px (tablet), 1024px (laptop), 1440px (desktop).
- Test with actual content — not just placeholder text. Long titles and varying image ratios break layouts.
Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.