Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
yonatangross avatar

Responsive Patterns

  • 1.1k installs
  • 213 repo stars
  • Updated August 4, 2026
  • yonatangross/orchestkit

responsive-patterns is a frontend CSS skill that generates production-ready container query patterns responding to parent element size instead of viewport for developers building component-level responsive layouts.

About

responsive-patterns is an orchestkit skill that documents and generates CSS container query patterns for component-level responsiveness. It covers container-type values inline-size, size, and normal, named containers via container-name, shorthand container syntax, and @container queries with min-width, max-width, range, and logical property forms like min-inline-size. Developers reach for responsive-patterns when cards, sidebars, or nested components must reflow based on parent width rather than global viewport media queries. The reference includes named container queries such as @container card (min-width: 400px) for production-ready patterns.

  • Complete container-type reference with inline-size, size, and named containers
  • Full @container query syntax including range queries and logical properties
  • Container query length units: cqi, cqb, cqmin, cqmax
  • Native Tailwind CSS v4 integration examples with @container and variant syntax
  • Logical property patterns that work across writing modes and layouts

Responsive Patterns by the numbers

  • 1,053 all-time installs (skills.sh)
  • +47 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #358 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/yonatangross/orchestkit --skill responsive-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.1k
repo stars213
Security audit3 / 3 scanners passed
Last updatedAugust 4, 2026
Repositoryyonatangross/orchestkit

How do you write CSS container queries for components?

Generate production-ready container query patterns that respond to parent element size instead of viewport.

Who is it for?

Frontend developers building reusable components that must adapt to parent width in design systems or nested layouts.

Skip if: Page-level viewport breakpoints only or backend API work with no CSS layout requirements.

When should I use this skill?

A developer asks for container queries, parent-responsive layouts, or @container patterns instead of viewport media queries.

What you get

Production-ready CSS with container-type, container-name, and @container query blocks for parent-size-responsive layouts.

  • @container CSS rule blocks
  • container-type and container-name declarations

Files

SKILL.mdMarkdownGitHub ↗

Responsive Patterns

Modern responsive design patterns using Container Queries, fluid typography, and mobile-first strategies for React applications (2026 best practices).

Overview

  • Building reusable components that adapt to their container
  • Implementing fluid typography that scales smoothly
  • Creating responsive layouts without media query overload
  • Building design system components for multiple contexts
  • Optimizing for variable container sizes (sidebars, modals, grids)

Core Concepts

Container Queries vs Media Queries

FeatureMedia QueriesContainer Queries
Responds toViewport sizeContainer size
Component reuseContext-dependentTruly portable
Browser supportUniversalBaseline 2023+
Use casePage layoutsComponent layouts

Modern CSS Layout

Load Read("${CLAUDE_SKILL_DIR}/rules/css-subgrid.md") for CSS Subgrid patterns: nested grid alignment, card layouts with aligned titles/content/actions, two-dimensional subgrid.
Load Read("${CLAUDE_SKILL_DIR}/rules/css-intrinsic-responsive.md") for intrinsically responsive layouts: auto-fit/minmax grids, clamp() for fluid everything, container queries for component logic, zero media query patterns.
Load Read("${CLAUDE_SKILL_DIR}/rules/responsive-foldables.md") for foldable/multi-screen device support: env(safe-area-inset-*), viewport segment queries, dual-screen layouts, progressive enhancement.

Key patterns covered: CSS Subgrid alignment, intrinsic responsive grids (auto-fit + minmax), fluid clamp() scales, foldable device layouts, safe area insets, viewport segment queries.

CSS Patterns

Load Read("${CLAUDE_SKILL_DIR}/rules/css-patterns.md") for complete CSS examples: container queries, cqi/cqb units, fluid typography with clamp(), mobile-first breakpoints, CSS Grid patterns, and scroll-queries.

Key patterns covered: Container Query basics, Container Query Units (cqi/cqb), Fluid Typography with clamp(), Container-Based Fluid Typography, Mobile-First Breakpoints, CSS Grid Responsive Patterns, Container Scroll-Queries (Chrome 126+).

React Patterns

Load Read("${CLAUDE_SKILL_DIR}/rules/react-patterns.md") for complete React examples: ResponsiveCard component, Tailwind container queries, useContainerQuery hook, and responsive images.

Key patterns covered: Responsive Component with Container Queries, Tailwind CSS Container Queries, useContainerQuery Hook, Responsive Images Pattern.

Accessibility Considerations

/* IMPORTANT: Always include rem in fluid typography */
/* This ensures user font preferences are respected */

/* ❌ WRONG: Viewport-only ignores user preferences */
font-size: 5vw;

/* ✅ CORRECT: Include rem to respect user settings */
font-size: clamp(1rem, 0.5rem + 2vw, 2rem);

/* User zooming must still work */
@media (min-width: 768px) {
  /* Use em/rem, not px, for breakpoints in ideal world */
  /* (browsers still use px, but consider user zoom) */
}

Anti-Patterns (FORBIDDEN)

/* ❌ NEVER: Use only viewport units for text */
.title {
  font-size: 5vw; /* Ignores user font preferences! */
}

/* ❌ NEVER: Use cqw/cqh (use cqi/cqb instead) */
.card {
  padding: 5cqw; /* cqw = container width, not logical */
}
/* ✅ CORRECT: Use logical units */
.card {
  padding: 5cqi; /* Container inline = logical direction */
}

/* ❌ NEVER: Container queries without container-type */
@container (min-width: 400px) {
  /* Won't work without container-type on parent! */
}

/* ❌ NEVER: Desktop-first media queries */
.element {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
  .element {
    grid-template-columns: 1fr; /* Overriding = more CSS */
  }
}

/* ❌ NEVER: Fixed pixel breakpoints for text */
@media (min-width: 768px) {
  body { font-size: 18px; } /* Use rem! */
}

/* ❌ NEVER: Over-nesting container queries */
@container a {
  @container b {
    @container c {
      /* Too complex, reconsider architecture */
    }
  }
}

Browser Support

FeatureChromeSafariFirefoxEdge
Container Size Queries105+16+110+105+
Container Style Queries111+111+
Container Scroll-State126+126+
cqi/cqb units105+16+110+105+
clamp()79+13.1+75+79+
Subgrid117+16+71+117+

Rules

Each category has individual rule files in rules/ loaded on-demand:

CategoryRuleImpactKey Pattern
Modern CSS Layoutrules/css-subgrid.mdHIGHCSS Subgrid for nested grid alignment, card layouts
Modern CSS Layoutrules/css-intrinsic-responsive.mdHIGHIntrinsic responsive layouts, auto-fit/minmax, clamp(), zero breakpoints
Modern CSS Layoutrules/responsive-foldables.mdMEDIUMFoldable devices, safe area insets, viewport segments
CSSrules/css-patterns.mdHIGHContainer queries, cqi/cqb, fluid typography, grid, scroll-queries
Reactrules/react-patterns.mdHIGHContainer query components, Tailwind, useContainerQuery, responsive images
PWArules/pwa-service-worker.mdHIGHWorkbox caching strategies, VitePWA, update management
PWArules/pwa-offline.mdHIGHOffline hooks, background sync, install prompts
Animationrules/animation-motion.mdHIGHMotion presets, AnimatePresence, View Transitions
Animationrules/animation-scroll.mdMEDIUMCSS scroll-driven animations, parallax, progressive enhancement
Touch & Mobilerules/touch-interaction.mdHIGHTouch targets (44px min), thumb zones, pinch-to-zoom, safe areas, gestures

Total: 10 rules across 6 categories

Key Decisions

DecisionOption AOption BRecommendation
Query typeMedia queriesContainer queriesContainer for components, Media for layout
Container unitscqw/cqhcqi/cqbcqi/cqb (logical, i18n-ready)
Fluid type basevw onlyrem + vwrem + vw (accessibility)
Mobile-firstYesDesktop-firstMobile-first (less CSS, progressive)
Grid patternauto-fitauto-fillauto-fit for cards, auto-fill for icons

Related Skills

  • design-system-starter - Building responsive design systems
  • ork:performance - CLS, responsive images, and image optimization
  • ork:i18n-date-patterns - RTL/LTR responsive considerations

Capability Details

container-queries

Keywords: @container, container-type, inline-size, container-name Solves: Component-level responsive design

fluid-typography

Keywords: clamp(), fluid, vw, rem, scale, typography Solves: Smooth font scaling without breakpoints

responsive-images

Keywords: srcset, sizes, picture, art direction Solves: Responsive images for different viewports

mobile-first-strategy

Keywords: min-width, mobile, progressive, breakpoints Solves: Efficient responsive CSS architecture

grid-flexbox-patterns

Keywords: auto-fit, auto-fill, subgrid, minmax Solves: Responsive grid and flexbox layouts

container-units

Keywords: cqi, cqb, container width, container height Solves: Sizing relative to container dimensions

References

Load on demand with Read("${CLAUDE_SKILL_DIR}/references/<file>"):

FileContent
container-queries.mdContainer query patterns
fluid-typography.mdAccessible fluid type scales

Related skills

How it compares

Choose responsive-patterns for component-level parent queries; use traditional breakpoint skills for full-page viewport responsive design.

FAQ

What container types does responsive-patterns document?

responsive-patterns documents container-type inline-size for width queries, size for width and height, and normal for no containment. Named containers use container-name and the shorthand container: name / inline-size syntax.

When should developers use responsive-patterns over media queries?

responsive-patterns fits component-level layouts where parent width matters—cards, sidebars, nested widgets. Viewport media queries handle page-level breakpoints; container queries let each component respond to its own container size.

Is Responsive Patterns safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.