From design-engineer
Modern CSS for layout, responsive design, and styling architecture.
How this skill is triggered — by the user, by Claude, or both
Slash command
/design-engineer:css-craftThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Modern CSS for expert front-end work. Default to intrinsic, declarative layout. Reach for hacks only when a platform gap forces it.
Modern CSS for expert front-end work. Default to intrinsic, declarative layout. Reach for hacks only when a platform gap forces it.
flex-wrap + gap).grid-template-columns: subgrid lets a nested grid inherit the parent's tracks so card internals (title, body, footer) align across siblings. Use it instead of hardcoding matching heights.Components should respond to their own available width, not the viewport. A card in a sidebar and the same card full-width should adapt independently. This is the default for component-level responsiveness.
.card-list {
container-type: inline-size;
}
.card {
display: grid;
gap: 1rem;
}
@container (min-width: 24rem) {
.card {
grid-template-columns: auto 1fr;
}
}
Reserve viewport media queries for true page-level shifts (e.g. collapsing the whole app shell).
Use flow-relative properties so layout survives RTL and vertical writing modes without rework.
margin-inline / margin-block over margin-left/right / top/bottompadding-inline / padding-blockinset-inline-start / inset over left / topborder-inline-start, text-align: startPhysical properties leak direction assumptions; logical properties are direction-safe by construction.
clamp(min, preferred, max) for type and spacing that scales with the viewport without breakpoints. Preferred value uses a viewport unit so it interpolates smoothly.min() / max() to cap or floor a value against context.fit-content, min-content, max-content for content-driven track and box sizing.:root {
--step-0: clamp(1rem, 0.92rem + 0.4vw, 1.25rem);
--step-1: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
--step-2: clamp(1.56rem, 1.3rem + 1.3vw, 2.44rem);
}
h2 { font-size: var(--step-2); }
p { font-size: var(--step-0); }
:where(...) wraps selectors at zero specificity — ideal for resets, defaults, and library styles that consumers must override effortlessly. :is(...) is the same grouping but takes the specificity of its strongest argument.@layer (cascade layers) orders override priority explicitly, independent of source order or specificity. Define the order once, then later layers always win:@layer reset, base, components, utilities;
@layer components {
.btn { background: var(--accent); }
}
Layers end specificity wars: a utilities rule beats a components rule even with lower specificity, because the layer order decides.
gap on flex, grid, and display: flex — never margin hacks for spacing between siblings.aspect-ratio for media boxes and avatars instead of padding-percent tricks.:has() — the relational selector. Style a parent from its children: .field:has(input:invalid), .card:has(img), form:has(:focus-visible).min-width container/media queries.clamp, custom properties), not hand-tuned pixel constants.Responsive card grid (intrinsic, no media queries):
.grid {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}
Cards fill the row, wrap when they hit 16rem, and min(16rem, 100%) prevents overflow on narrow screens.
Container-query card adapting to its slot — see the example under Container Queries: the card switches from stacked to side-by-side based on its container, so it works identically in a sidebar or a full-width region.
!important. Fix with @layer and :where(), not more specificity.height: 400px clips content. Prefer min-height, intrinsic sizing, and aspect-ratio.rem for type/space, clamp() for fluidity..a .b .c .d is fragile and slow to override. Keep selectors flat and component-scoped.npx claudepluginhub shoto290/shoto --plugin design-engineerProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.