responsive-design

Implement responsive layouts using container queries, fluid typography, and CSS Grid.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/scoots31/engineering-playbook --skill responsive-design-scoots31
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: responsive-design
Source: https://github.com/scoots31/engineering-playbook/tree/main/references/responsive-design
Command: npx skills add https://github.com/scoots31/engineering-playbook --skill responsive-design-scoots31

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building interfaces that adapt cleanly across phones, tablets, and desktops often leads to brittle breakpoint hacks, fixed-width overflow bugs, and inconsistent typography. This Skill provides proven CSS and React patterns for modern responsive design so layouts adapt correctly at every screen size. ## Core Features & Use Cases - Container Queries: Build component-level responsiveness independent of the viewport using @container rules and container query units (cqi, cqw). - Fluid Typography & Spacing: Create type and spacing scales with CSS clamp() that scale smoothly between minimum and maximum bounds. - Responsive Layout Patterns: Apply CSS Grid auto-fit/auto-fill patterns, named grid areas, responsive navigation, responsive images with srcset, and adaptive tables. - Use Case: You are building a product card grid that must show one column on mobile and four on desktop, with card internals rearranging based on the card's own width. Use the container query and auto-fit grid patterns to implement this without writing dozens of media queries. ## Quick Start Use the responsive-design skill to convert my card component to use container queries and fluid typography.

Frequently Asked Questions about responsive-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use CSS container queries for responsive components?

Define a containment context with container-type: inline-size on the parent, then use @container rules to style children based on the container's width rather than the viewport. Container query units like cqi let you size elements relative to the container.

How to create fluid typography with CSS clamp()?

Use clamp(min, preferred, max) where the preferred value combines a rem base with a vw term, such as clamp(1rem, 0.9rem + 0.5vw, 1.125rem). This scales font size smoothly between the minimum and maximum bounds as the viewport changes.

What is the difference between auto-fit and auto-fill in CSS Grid?

auto-fit collapses empty tracks so existing items stretch to fill the row, while auto-fill preserves empty column tracks. Use repeat(auto-fit, minmax(min(300px, 100%), 1fr)) for grids where items should expand when fewer items are present.

Why does 100vh cause layout issues on mobile browsers?

100vh includes space hidden behind mobile browser UI like address bars, causing content cutoff. Use 100dvh (dynamic viewport height) instead, which adjusts as browser chrome appears and disappears, or 100svh for the guaranteed minimum visible height.

How do I make responsive tables work on mobile screens?

Wrap the table in a container with overflow-x: auto and a min-width so it scrolls horizontally, or switch to a card-based layout below a breakpoint where each row becomes a stacked card with label-value pairs.

When should I use container queries instead of media queries?

Use container queries when a component's layout should depend on the space it occupies rather than the viewport, such as cards reused in sidebars and main content. Media queries remain appropriate for page-level layout changes like overall grid structure.