Use container queries (@container) for component-level responsiveness and adapt the interface for different contexts—don’t just shrink it.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pbakaus/impeccable/llms.txt
Use this file to discover all available pages before exploring further.
Mobile-First: Write It Right
Start with base styles for mobile, usemin-width queries to layer complexity. Desktop-first (max-width) means mobile loads unnecessary styles first.
Breakpoints: Content-Driven
Don’t chase device sizes—let content tell you where to break. Start narrow, stretch until design breaks, add breakpoint there. Three breakpoints usually suffice: 640, 768, 1024px Useclamp() for fluid values without breakpoints:
Detect Input Method, Not Just Screen Size
Safe Areas: Handle the Notch
Modern phones have notches, rounded corners, and home indicators. Useenv():
Responsive Images: Get It Right
srcset with Width Descriptors
srcsetlists available images with their actual widths (wdescriptors)sizestells the browser how wide the image will display- Browser picks the best file based on viewport width AND device pixel ratio
Picture Element for Art Direction
When you need different crops/compositions (not just resolutions):Layout Adaptation Patterns
Navigation
Three stages:- Mobile: Hamburger + drawer
- Tablet: Horizontal compact
- Desktop: Full with labels
Tables
Transform to cards on mobile usingdisplay: block and data-label attributes:
Progressive Disclosure
Use<details>/<summary> for content that can collapse on mobile:
Testing: Don’t Trust DevTools Alone
DevTools device emulation is useful for layout but misses:- Actual touch interactions
- Real CPU/memory constraints
- Network latency patterns
- Font rendering differences
- Browser chrome/keyboard appearances
Guidelines
DO
- Use container queries (@container) for component-level responsiveness
- Adapt the interface for different contexts—don’t just shrink it
- Start mobile-first and layer complexity
- Test on real devices, not just emulators
- Use pointer and hover queries to detect input methods
- Handle safe areas on notched devices
DON’T
- Hide critical functionality on mobile—adapt the interface, don’t amputate it
- Use desktop-first design
- Do device detection instead of feature detection
- Create separate mobile/desktop codebases
- Ignore tablet and landscape orientations
- Assume all mobile devices are powerful
