Css architecture

From aj-geddes/useful-ai-prompts · View interactive version

Css architecture is an AI agent skill from the GitHub repository aj-geddes/useful-ai-prompts. Organize CSS using BEM, SMACSS, and CSS-in-JS patterns. Use when building scalable, maintainable styling systems with proper naming conventions.

How to use this skill

Skill file

CSS Architecture

Table of Contents

Overview

Build maintainable CSS systems using methodologies like BEM (Block Element Modifier), SMACSS, and CSS-in-JS patterns with proper organization and conventions.

When to Use

Quick Start

Minimal working example:

/* Block - standalone component */
.button {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

/* Element - component part */
.button__icon {
  margin-right: 8px;
  vertical-align: middle;
}

/* Modifier - variant */
.button--primary {
  background-color: #007bff;
  color: white;
}

.button--primary:hover {
  background-color: #0056b3;
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

| Guide | Contents |

|---|---|

| BEM (Block Element Modifier) Pattern | BEM (Block Element Modifier) Pattern |

| SMACSS (Scalable and Modular Architecture for CSS) | SMACSS (Scalable and Modular Architecture for CSS) |

| CSS-in-JS with Styled Components | CSS-in-JS with Styled Components |

| CSS Variables (Custom Properties) | CSS Variables (Custom Properties) |

| Utility-First CSS (Tailwind Pattern) | Utility-First CSS (Tailwind Pattern) |

Best Practices

✅ DO

❌ DON'T

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.