build.log
Quay lai ghi chu
CSS
Cap nhat 8 thg 1, 2026

Responsive Design Patterns

Common responsive design patterns and when to use each approach.

css
responsive
design
patterns

Fluid Typography Use `clamp()` for responsive font sizes without media queries: `font-size: clamp(1rem, 2.5vw, 2rem)`.

Container Queries The future of responsive design. Style components based on their container size, not viewport.

Common Breakpoints - Mobile: < 640px - Tablet: 640px - 1024px - Desktop: > 1024px

Patterns - **Stack to Grid**: Single column on mobile, multi-column on desktop - **Sidebar Collapse**: Sidebar becomes bottom nav or hamburger - **Priority+**: Show essential content first, reveal more on larger screens - **Off-Canvas**: Slide-in panels for secondary content