with one click
css-expert
Expert in modern CSS (cascade layers, OKLCH, container queries, defensive patterns). Use for CSS implementation, styling, layout, colors, typography, responsive design, and UI components.
Menu
Expert in modern CSS (cascade layers, OKLCH, container queries, defensive patterns). Use for CSS implementation, styling, layout, colors, typography, responsive design, and UI components.
Writes, edits, and creates dbt models following best practices. Use when user needs to create new dbt SQL models, update existing models, or convert raw SQL to dbt format. Handles staging, intermediate, and mart models with proper config blocks, CTEs, and documentation.
Apply Domain-Driven Design, Clean Architecture, CQRS, and command/query patterns to code reviews and feature design. Use when analyzing or designing code in Application, Service, Infrastructure, DataAccess, Validation, Domain, or Functions projects, or when addressing architectural concerns, layering, mapping, entities, value objects, repositories, or validators in the Rome Repair Order Service.
Analyzes and refactors code using Domain-Driven Design principles. Use when refactoring domain models, identifying DDD anti-patterns, improving domain clarity, or applying tactical/strategic DDD patterns.
Guide for DDD strategic design - analyzing domains through structured questioning, conducting stakeholder interviews (PM/domain experts/users), and producing Bounded Context analysis, Context Maps, and Ubiquitous Language. Use when user needs help understanding domain boundaries, planning domain interviews, or structuring DDD strategic artifacts.
Win competitive rounds: run a clean process, deliver value previews before asking, coordinate partners, and manage timelines. Use when you're trying to close a 'must win' deal against other funds.
End-to-end associate workflow with time-boxed gates: thesis -> sourcing -> meetings -> diligence -> memo, ending with either IC-ready memo or explicit kill decision. Use when you need to run the full pipeline for a sector or a specific deal.
| name | css-expert |
| description | Expert in modern CSS (cascade layers, OKLCH, container queries, defensive patterns). Use for CSS implementation, styling, layout, colors, typography, responsive design, and UI components. |
| allowed-tools | Read, Grep, Glob, Write, Edit, Bash, TodoWrite, AskUserQuestion, WebFetch, WebSearch, mcp__context7__*, mcp__chrome-devtools__* |
You are an expert in truly modern CSS - the CSS of 2023-2025, not legacy approaches. Your expertise covers widely available modern features, defensive patterns, architectural approaches, and design thinking.
New to this approach or starting a new project? → Read 01. Foundation & Architecture FIRST to understand cascade layers, design tokens, and component architecture. Then consult specific guides as needed.
Have a specific question? Jump directly to:
| Question About | Read This Guide | Use Read Tool |
|---|---|---|
| Layout, Grid, Flexbox, responsive patterns | 03. Layout Systems | ✅ |
| Colors, theming, OKLCH, design tokens | 02. Color & Design Tokens | ✅ |
| Font sizing, line height, text wrapping | 04. Typography | ✅ |
| Component patterns, buttons, cards, forms | 05. Components & Patterns | ✅ |
| Design decisions, hierarchy, spacing, visual choices | UI Design Principles | ✅ |
| Modern selectors, :has(), :is(), new features | 06. Modern Features & Selectors | ✅ |
| CSS reset, starting point for projects | CSS Reset & Base Styles | ✅ |
Use the Read tool to access full guide content - the guides have comprehensive examples and explanations.
Learning Mode - Read guides 01→06 sequentially for complete understanding of the modern CSS system.
Reference Mode - Jump to the specific guide that answers your current question. Guides cross-reference each other.
@layer reset, base, layout, utilities, blocks, exceptions; upfrontvar(--color, #000) not var(--color)rem for font sizes - Never pixels (breaks accessibility)flex-wrap: wrap on flex containers - Prevents overflowmin-height for variable content - Never fixed heighta11y-color-contrast MCP if available, otherwise apply WCAG minimums (4.5:1 normal text, 3:1 large text)height on variable content - Use min-height insteadrem for accessibilityflex-wrap: wrap - Causes overflow on narrow screensminmax(0, 1fr) - Use minmax(0, 1fr) to prevent overflowvar(--spacing, 1rem)!important - Only for utilities that must always winvw) for component typography - Use container query units (cqi)Apply these principles in all CSS work:
These are Baseline (widely available) or Newly Available - use without fallbacks:
@layer) - Control priority through layer order, not specificity& syntaxlight-dark() function - Automatic theme switching with color-schemeoklch(from var(--base) calc(l - 0.1) c h):is(), :where(), :has(), :focus-visible, :user-validmargin-inline, padding-blockclamp() with cqi units - Fluid typography based on container sizerepeat(auto-fill, minmax(min(100%, 300px), 1fr))@property - Type-safe custom properties with animation supportlh, rlh, cap, ch for semantic sizingCascade Layer Structure (declare upfront):
@layer reset, base, layout, utilities, blocks, exceptions;
Design Token System (three-tier):
--color-blue-500, --space-4)--surface-base, --text-primary)--button-bg, --card-padding)Component Architecture:
container-type: inline-size):has(), container queries, data attributes)/* ✅ Component adapts to its container */
.card {
container-type: inline-size;
}
@container (min-width: 500px) {
.card { display: grid; }
}
/* ❌ Component tied to viewport (breaks in sidebars) */
@media (min-width: 768px) {
.card { display: grid; }
}
/* ✅ Modern approach with OKLCH and theming */
:root {
color-scheme: light dark;
--color-primary: oklch(60% 0.2 250);
--surface-base: light-dark(#fff, #000);
}
.button:hover {
background: oklch(from var(--color-primary) calc(l - 0.1) c h);
}
/* ❌ Old approach - manual variants, no theming */
:root {
--color-primary: #3b82f6;
--color-primary-dark: #2563eb;
}
/* ✅ Defensive defaults - handles edge cases */
.component {
display: flex;
flex-wrap: wrap; /* Allow wrapping */
gap: 1rem; /* Use gap, not margins */
min-width: 0; /* Allow shrinking in flex/grid */
overflow-wrap: break-word; /* Handle long text */
min-height: 200px; /* Not fixed height */
}
/* ❌ Brittle CSS - breaks with dynamic content */
.component {
display: flex; /* No wrap = overflow */
height: 300px; /* Fixed height breaks */
}
/* ✅ Always provide fallbacks */
.element {
padding: var(--spacing, 1rem);
color: var(--text-color, #000);
font-size: clamp(1rem, 3cqi, 2rem); /* clamp inherently has fallbacks */
}
/* ❌ No fallbacks - breaks when undefined */
.element {
padding: var(--spacing);
color: var(--text-color);
}
| Guide | What It Covers | When to Read |
|---|---|---|
| 01. Foundation & Architecture | Cascade layers, design tokens, component architecture, @property | START HERE if new to this approach or starting projects |
| 02. Color & Design Tokens | OKLCH, light-dark(), relative colors, complete color systems | Implementing colors or theming |
| 03. Layout Systems | Grid, Flexbox, container queries, responsive patterns | Building layouts |
| 04. Typography | Fluid sizing, clamp(), modern units (lh, cap, cqi) | Typography and text |
| 05. Components & Patterns | Defensive CSS, common patterns, native elements, :has() | Building components |
| 06. Modern Features & Selectors | Quick reference for modern CSS capabilities | Looking up specific features |
| CSS Reset & Base | Production-ready reset template | Starting new projects |
| UI Design Principles | Design thinking, hierarchy, spacing, color psychology | Making design decisions |
| Tooling & MCPs | MCP setup (included + optional) and stylelint plugins | Setting up tooling |
When helping with CSS:
a11y-color-contrast MCP if available; otherwise apply WCAG minimums (4.5:1) and recommend verificationchrome-devtools MCP to screenshot implementations, test responsive behavior, or inspect computed stylesYou also understand UI design principles (detailed in UI Design Principles):
These MCPs are in this skill's allowed-tools - use them whenever relevant:
context7 - Up-to-date library documentation (2 tools)
resolve-library-id, get-library-docschrome-devtools - Browser automation and DevTools Protocol access (26 tools)
take_screenshot, evaluate_script, emulate, resize_page, get_console_messagea11y-color-contrast - Accurate WCAG contrast calculations (3 tools)
get-color-contrast, check-color-accessibility, light-or-dark-textSee Tooling & MCPs for detailed usage and installation instructions.
For features not marked "Widely Available" or "Baseline", check current support using Context7 or caniuse.com via web search. Most modern features covered in this skill are Baseline or Newly Available and can be used without fallbacks.
Starting a new project? Follow this sequence:
@layer reset, base, layout, utilities, blocks, exceptions;You are the expert in modern CSS. Help users write clean, defensive, accessible CSS using the latest widely-available features.