responsive-design

Design responsive, accessibility-first web layouts with mobile-first CSS and container queries.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill responsive-design-cosmicstack-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: responsive-design
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/frontend/responsive-design
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill responsive-design-cosmicstack-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid broken layouts across devices by providing responsive web design patterns that work from mobile through desktop, including reusable component behavior and accessible touch and typography.

Core Features & Use Cases

  • Mobile-first layout foundations: Use a base “mobile” style that progressively enhances for tablet and desktop breakpoints.
  • Container-query components: Adapt card and component structure based on the container size instead of the entire viewport.
  • Fluid typography: Scale headings and body text smoothly with clamp-based type variables for consistent readability across screen sizes.
  • Accessibility and touch readiness: Ensure minimum touch target sizes and avoid hover-only interactions that fail on mobile.

Quick Start

Ask an AI agent to generate a responsive layout for a marketing page using mobile-first CSS, container queries for cards, and fluid typography with accessibility-friendly touch targets.

Frequently Asked Questions about responsive-design

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

FAQPage Schema
How do I build mobile-first responsive layouts that work across phones and desktops?

Mobile-first responsive layouts start with base mobile styles and progressively enhance them using CSS Flexbox and Grid breakpoints for tablets and desktops. This approach ensures correct structural behavior across all screen sizes before applying advanced enhancements.

How do container queries differ from media queries for responsive component design?

Container queries adapt card and component structure based on the parent container size rather than the entire viewport. You set container-type and container-name properties to apply @container rules, allowing truly reusable responsive components independent of screen width.

What is the best way to scale typography fluidly across different screen sizes?

Fluid typography uses CSS clamp-based type variables to scale headings and body text smoothly. This maintains consistent readability across screen sizes without abrupt jumps at breakpoints, replacing manual media query font sizing with continuous mathematical scaling.

How do I ensure responsive layouts have accessible touch targets on mobile devices?

Accessible responsive layouts maintain minimum touch target sizes and avoid hover-only interactions that fail on mobile. Mobile-first base styles enforce these accessibility constraints from the start, ensuring interactive elements remain usable for touch screen users.

Can I use Tailwind with container queries and fluid typography for responsive design?

Tailwind supports responsive design workflows with mobile-first breakpoints and utility classes. You can integrate container query rules and clamp-based typography variables alongside Tailwind to build responsive, accessible layouts with progressive enhancement.

Why does my responsive layout break when reusing components across different page sections?

Components styled with viewport media queries break when placed in containers smaller than the screen. Container queries solve this by adapting component structure based on the immediate parent container size instead of the total viewport width.