responsive-design

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

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/jason23452/my-skill --skill responsive-design-jason23452
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: responsive-design
Source: https://github.com/jason23452/my-skill/tree/main/flow/responsive-design
Command: npx skills add https://github.com/jason23452/my-skill --skill responsive-design-jason23452

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building interfaces that adapt cleanly across screen sizes often leads to device-specific breakpoints, fixed pixel values, and components that break when reused in different contexts. This Skill provides modern CSS patterns for creating layouts that respond to content and container size rather than device assumptions. ## Core Features & Use Cases - Container Queries: Build component-level responsiveness with container-type, named containers, and container query units (cqi, cqw) so components adapt to their own size. - Fluid Typography & Spacing: Create smooth scaling type and spacing systems using clamp(), min(), max(), and viewport units without excessive media queries. - Responsive Layout Patterns: Apply CSS Grid auto-fit patterns, Flexbox switcher/sidebar layouts, responsive tables, navigation, and images with srcset and art direction. - Use Case: When building a dashboard card that must work in a narrow sidebar and a wide main panel, use container queries so the card switches from stacked to side-by-side layout based on its container width, not the viewport. ## Quick Start Use the responsive-design skill to refactor my card component so it adapts to its container width using 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?▼

Set container-type: inline-size on a wrapper element, then use @container (min-width: 400px) to style children based on the container's width. Named containers via container-name let you target specific contexts when multiple containers exist.

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 text smoothly between the minimum and maximum sizes without media queries.

What is the difference between container queries and media queries?▼

Media queries respond to the viewport size, while container queries respond to the size of a specific parent container. Container queries make components truly reusable since they adapt to wherever they are placed, not the overall screen.

Do container queries work in all browsers?▼

Container queries are supported in Chrome 105+, Firefox 110+, and Safari 16+. For older browsers, wrap container query rules in @supports (container-type: inline-size) and provide media query fallbacks.

Why does 100vh cause layout issues on mobile browsers?▼

Mobile browsers include dynamic UI chrome in the vh calculation, causing content overflow. Use 100dvh for dynamic viewport height, 100svh for the minimum, or 100lvh for the maximum to handle browser UI correctly.

How do I make responsive tables that work on mobile?▼

Either wrap the table in an overflow-x: auto container with a min-width, or transform rows into stacked cards below a breakpoint using display: block on rows and data-label attributes for cell labels.