responsive-design

Implement responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoints.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill responsive-design-sanketadlak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: responsive-design
Source: https://github.com/SanketAdlak/PDMProjectDesign/tree/main/.agents/skills/responsive-design
Command: npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill responsive-design-sanketadlak

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building interfaces that adapt cleanly across phones, tablets, and desktops often leads to brittle breakpoint hacks, fixed pixel widths, and components that break when placed in different contexts. This Skill provides proven CSS patterns for creating layouts that respond to both viewport and container size. ## 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 parent, not just the viewport. - Fluid Typography & Spacing: Generate clamp()-based type and spacing scales that scale smoothly between minimum and maximum bounds without media query jumps. - Responsive Layout Patterns: Apply CSS Grid auto-fit layouts, Flexbox distribution, responsive navigation, tables, and images with srcset and art direction. - Use Case: You are building a card component reused in a sidebar and a main content area. Use container queries so the card switches from stacked to horizontal layout based on its own width, regardless of screen size. ## Quick Start Use the responsive-design skill to convert my fixed-width card grid into a fluid layout with container queries and clamp-based 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 parent element, then use @container (min-width: 400px) to style children based on the container's width. This lets components adapt to their placement context rather than the viewport.

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). The font scales smoothly with the viewport while staying within the min and max bounds.

Does Tailwind CSS support container queries?

Yes, Tailwind CSS v3.2+ supports container queries via the @tailwindcss/container-queries plugin. Add @container to a parent element, then use variants like @md:flex-row on children to respond to container width.

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 to fill available space.

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 shows or hides, with svh and lvh for minimum and maximum cases.

When should I use container queries instead of media queries?

Use container queries when a component's layout should depend on its own available space, such as cards reused in sidebars and main areas. Use media queries for page-level layout changes tied to the overall viewport, like navigation patterns.