This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A CSS-First Agent Skill — a knowledge base of rules, CSS demos, and references that AI agents consume. See SKILL.md for the full skill definition, capabilities, and quick reference table.
This is a knowledge base repository with no build process or test runner. All content is static markdown and CSS files meant to be read by AI agents.
- Indentation: 2 spaces in Markdown, 2 spaces in CSS examples
- Prefer logical properties and modern CSS features (2021-2025)
- Demo files:
css-demos/<category>/<kebab-case>.css - Markdown sections: Title Case headings
- Demos should be self-documenting with brief, high-signal comments and MDN links
- When a browser MCP server (Playwright, Chrome DevTools, Browser MCP) or browser hook is available, use it to verify CSS renders correctly — see
references/rules/browser-verification.md
All examples in css-demos/ follow this header format:
/**
* [Feature Name]
*
* MDN: [Direct MDN link]
* Baseline: [🟢/🔵/🟡/🟣 Status]
* Support: [Percentage]
*
* Task: [What it does]
* Why: [Rationale for approach]
*/- Choose appropriate category folder in
css-demos/ - Follow the header format above
- Use modern CSS features (2021-2025) and logical properties throughout
- Update
css-demos/INDEX.mdwith new entry - Verify the example works in a modern browser
- Create new
.mdfile inreferences/rules/ - Include clear examples with wrong and correct patterns
- Explain the principle and when to apply it
- Provide validation checklist
- Reference in
SKILL.mdrules table
- Commit messages follow Conventional Commits:
type: short summary- Examples:
docs: add new layout demo,chore: update references
- Examples:
- PRs should include:
- A brief description of the change
- Links to relevant MDN pages if you added or updated CSS features
- Screenshot or GIF for visual demos when behavior is easier to see than to describe
SKILL.md— Main skill definition (capabilities, rules table, quick reference)references/rules/— Behavioral rules (7 files)references/live-mdn-fetch.md— Live MDN data fetch workflowcss-demos/INDEX.md— Catalog of all 47 CSS examples with metadata
css-demos/layout/— Centering, spacing, subgrid,:has(), nesting, grid lanes, isolation/stacking, stretchcss-demos/responsive/— Media queries,@supports, viewport units (sv/lv/dv)css-demos/container/— Size queries, style queries, scroll-state queries, anchored queriescss-demos/animation/— View transitions (+ nested groups), scroll-driven, scroll-triggered,@starting-stylecss-demos/theming/—light-dark()css-demos/positioning/— Anchor positioningcss-demos/interaction/— CSS carousel, popover, interest invokers, hover queries, overscroll-behavior, scroll-margin/padding,:target/:focus-withincss-demos/visual/— Form validation,color-mix(), relative colors,backdrop-filter,mix-blend-mode,corner-shape,clip-path: shape(), gap decorations,text-box-trim,overflow: clipcss-demos/functions/—if(),@function,attr(),contrast-color(), trig functions,sibling-index()/sibling-count()css-demos/specificity/—@layer,@scopecss-demos/accessibility/—prefers-reduced-motion,prefers-contrast,prefers-reduced-transparency,forced-colorscss-demos/native-customization/— Customizable<select>