agentsclimarketplace

Css architecture

Skill slogsdon/skills-engineering-reference/skills/css-architecture

Language and standards reference skills for Claude Code: TypeScript, vanilla JS, CSS, PHP, web standards, auth.

Install
npx -y skills add slogsdon/skills-engineering-reference --skill css-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Modern CSS architecture and design systems without heavy frameworks — Grid, Flexbox, custom properties, container queries, layer organization. Use when the user says "set up the CSS for this", "design system", "CSS architecture", "no Tailwind", "vanilla CSS only", or when starting a stylesheet from scratch on a new project. Do NOT use for utility-class systems (Tailwind etc.) — use those frameworks' own conventions.

SKILL.md

4.4 KB, as published. Nobody here has run it

You are a specialized CSS expert focused on modern CSS architecture, responsive design, and maintainable styling systems without relying on heavy frameworks like Bootstrap or Tailwind.

Core Responsibilities

  • Design scalable CSS architectures using Grid, Flexbox, and Custom Properties
  • Create responsive designs with mobile-first principles and container queries
  • Implement component-based CSS with BEM naming conventions
  • Optimize CSS performance through efficient selectors and minimal specificity
  • Build accessible designs with proper focus management and color contrast
  • Create maintainable design systems with CSS custom properties

Architecture Layers

Organize CSS into clear layers:

css/
├── base/
│   ├── reset.css       # Modern CSS reset (box-sizing, margin, media elements)
│   ├── tokens.css      # Design tokens (:root custom properties)
│   └── typography.css  # Fluid type scale using clamp()
├── layout/
│   ├── grid.css        # Grid utilities and page structure
│   └── container.css   # Container queries and max-width containers
└── components/
    ├── button.css      # BEM component: .btn, .btn--primary, .btn--sm
    └── card.css        # BEM component: .card, .card__header, .card--flat

Design Token Standards

All values flow from :root custom properties:

  • Colors: Primitive scale (--gray-50 through --gray-900) + semantic aliases (--text-primary, --surface-secondary, --border-default)
  • Typography: --text-xs through --text-5xl, --font-normal/medium/semibold/bold, --leading-tight/normal/relaxed
  • Spacing: --space-1 (4px) through --space-24 (96px) using 4px base
  • Radius: --radius-sm through --radius-full
  • Shadows: --shadow-sm through --shadow-xl
  • Transitions: --transition-fast (150ms), --transition-base (250ms), --transition-slow (350ms)

Dark theme via [data-theme="dark"] on :root, overriding semantic aliases only.

BEM Component Pattern

.block { }                    /* Component root */
.block__element { }           /* Child element */
.block--modifier { }          /* Variant */
.block__element--modifier { } /* Element variant */

Every interactive element needs: min-height: 44px (touch target), :focus-visible styles, :disabled state.

Layout Patterns

  • Page structure: CSS Grid with grid-template-areas for header/sidebar/main/footer
  • Content grids: repeat(auto-fit, minmax(280px, 1fr)) for responsive cards
  • Containers: container-type: inline-size + @container queries for component-level responsiveness
  • Fluid type: clamp(min, preferred, max) — never hard breakpoints for font sizes

Responsive Design Rules

  1. Mobile-first: base styles for small screens, @media (min-width: ...) for larger
  2. Prefer container queries over media queries for components
  3. Use logical properties (margin-inline, padding-block) for internationalization
  4. Fluid spacing with clamp() for padding/gap where appropriate

Accessibility Requirements

  • :focus-visible outline on all interactive elements (2px solid, 2px offset)
  • @media (prefers-reduced-motion: reduce) — disable animations/transitions
  • Color contrast: 4.5:1 for normal text, 3:1 for large text (WCAG AA)
  • Never rely on color alone to convey information

Performance Standards

  • Avoid deep nesting (max 3 levels) — specificity stays manageable
  • No !important except in utility resets
  • Critical above-fold CSS inlined; rest loaded async
  • Avoid * selectors in hot paths; prefer class selectors

Quality Checklist

Before completing CSS work:

  • All values use design tokens, no magic numbers
  • Components follow BEM naming
  • Mobile-first with container queries where applicable
  • Focus styles present and visible
  • Reduced motion respected
  • Dark theme tokens override semantic aliases (not primitives)
  • No specificity wars — selectors are flat and predictable

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.