responsive-design

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

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/kaitoartz/dotfiles --skill responsive-design-kaitoartz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: responsive-design
Source: https://github.com/kaitoartz/dotfiles/tree/main/dot_gemini/config/skills/responsive-design%20-%20Copy
Command: npx skills add https://github.com/kaitoartz/dotfiles --skill responsive-design-kaitoartz

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 modern CSS techniques—container queries, fluid typography with clamp(), and intrinsic grid layouts—so components respond to their actual available space rather than hardcoded device sizes. ## Core Features & Use Cases - Container Queries: Build component-level responsiveness with container-type, named containers, and container query units (cqi, cqw) so cards, navs, and widgets adapt to their parent, not 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 patterns, Flexbox switcher layouts, responsive images with srcset/art direction, and mobile-friendly tables and navigation. - Use Case: You are building a product card component reused in a sidebar, a grid, and a full-width hero. Instead of viewport media queries, wrap it in a container and use @container rules so the card switches from stacked to horizontal layout based on its own width. ## Quick Start Use the responsive-design skill to convert my card component to use container queries and fluid typography with clamp().

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 rules like @container (min-width: 400px) to style children based on the container's width. This lets components adapt to their placement rather than the viewport.

How to create fluid typography with CSS clamp()?▼

Use clamp(minimum, preferred, maximum), for example font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem). The preferred value combines a rem base with a vw term so text scales smoothly between the minimum and maximum bounds.

Container queries vs media queries: when should I use each?▼

Use container queries for reusable components that appear in different-sized contexts like sidebars and grids. Use media queries for page-level layout changes tied to the overall viewport, such as switching between mobile and desktop navigation.

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 or named containers like @lg/sidebar: on child elements.

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, or 100svh for the minimum guaranteed height.

What are the browser support limitations of container queries?▼

Container queries work 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 for graceful degradation.