skills/responsive-layout-master/SKILL.md
Build responsive layouts with CSS Grid, container queries, fluid typography, clamp(), and mobile-first design. Activate on: responsive design, CSS Grid layout, fluid spacing, container queries, mobile-first, breakpoints. NOT for: styling/theming (use css-in-js-architect), animation layout changes (use animation-system-architect).
npx skillsauth add curiositech/windags-skills responsive-layout-masterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build fluid, responsive layouts using CSS Grid, container queries, clamp(), and mobile-first design that adapt from 320px phones to 4K displays without breakpoint jank.
Activate on: responsive layout implementation, CSS Grid complex layouts, clamp() fluid sizing, container queries for component responsiveness, mobile-first breakpoint strategy, "layout breaks at X width", sidebar/content/aside patterns.
NOT for: theming/tokens/colors -- use css-in-js-architect. Animating layout changes -- use animation-system-architect. Component library grid systems -- use design-system-creator.
min-width media queries.grid-template-areas for the main shell (header, sidebar, content, footer).clamp() for fluid sizing -- clamp(1rem, 0.5rem + 1.5vw, 2rem) smoothly scales between min and max.@container instead of @media.| Domain | Technologies | Key Patterns |
|--------|-------------|--------------|
| Page Layout | CSS Grid, grid-template-areas | Named areas, auto-fill, minmax() |
| Component Layout | Flexbox, CSS Grid | Intrinsic sizing, gap, align/justify |
| Fluid Sizing | clamp(), min(), max(), viewport units | Smooth scaling without breakpoints |
| Container Queries | @container, container-type | Component-intrinsic responsiveness |
| Fluid Typography | clamp() on font-size, line-height | Readable text at every viewport width |
| Breakpoint Strategy | Mobile-first min-width, Tailwind sm:md:lg: | Additive complexity approach |
.app-shell {
display: grid;
min-height: 100dvh;
grid-template-areas:
"header"
"main"
"footer";
grid-template-rows: auto 1fr auto;
}
@media (min-width: 768px) {
.app-shell {
grid-template-areas:
"header header"
"sidebar main"
"footer footer";
grid-template-columns: 280px 1fr;
grid-template-rows: auto 1fr auto;
}
}
@media (min-width: 1280px) {
.app-shell {
grid-template-areas:
"header header header"
"sidebar main aside"
"footer footer footer";
grid-template-columns: 280px 1fr 320px;
}
}
.header { grid-area: header; }
.sidebar { grid-area: sidebar; }
.main { grid-area: main; }
.aside { grid-area: aside; }
.footer { grid-area: footer; }
320px (mobile) 768px (tablet) 1280px+ (desktop)
┌──────────────┐ ┌───────────────────┐ ┌──────────────────────┐
│ header │ │ header │ │ header │
├──────────────┤ ├──────┬────────────┤ ├──────┬────────┬──────┤
│ │ │ side │ │ │ side │ │ aside│
│ main │ │ bar │ main │ │ bar │ main │ │
│ │ │ │ │ │ │ │ │
├──────────────┤ ├──────┴────────────┤ ├──────┴────────┴──────┤
│ footer │ │ footer │ │ footer │
└──────────────┘ └───────────────────┘ └──────────────────────┘
:root {
/* Fluid type scale: min @ 320px → max @ 1280px */
--text-sm: clamp(0.8rem, 0.74rem + 0.3vw, 0.875rem);
--text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
--text-lg: clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
--text-xl: clamp(1.25rem, 0.9rem + 1.7vw, 2rem);
--text-2xl: clamp(1.5rem, 0.8rem + 3.3vw, 3rem);
--text-3xl: clamp(2rem, 0.7rem + 5vw, 4rem);
/* Fluid spacing */
--space-sm: clamp(0.5rem, 0.3rem + 1vw, 1rem);
--space-md: clamp(1rem, 0.5rem + 2vw, 2rem);
--space-lg: clamp(1.5rem, 0.5rem + 4vw, 4rem);
--space-xl: clamp(2rem, 0.5rem + 6vw, 6rem);
}
body { font-size: var(--text-base); }
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
/* Cards auto-fill available space: minimum 280px, expand to fill */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
gap: var(--space-md);
}
This single rule handles 1-column (mobile), 2-column (tablet), 3-column (desktop), and 4-column (wide) without any media queries.
@media (max-width: 768px) leads to overriding desktop styles for mobile. Use min-width (mobile-first) so complexity is added, not subtracted.clamp() and auto-fill/auto-fit for smooth adaptation.100vw causing horizontal scroll -- 100vw includes the scrollbar width. Use 100% or 100dvw for the content area width.@container queries for component-level responsiveness.height: 600px on a container overflows on small screens. Use min-height or let content determine height.min-width media queries add complexity)clamp() for smooth scaling (no text size jumps)clamp() for padding/margins/gapsgrid-template-areas used for main page shell (readable and maintainable)auto-fill/minmax() (no hardcoded column counts)@container queries100vw that could cause horizontal scrollbar overflowmin-height: 100dvh used instead of 100vh (mobile browser chrome safe)tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.