CSS Architecture

CSS Architecture

Teaches a coding agent to organise scalable CSS using BEM, SMACSS, CSS variables, utility-first and CSS-in-JS patterns with consistent naming.

Skill files7 files

references/

templates/

SKILL.md89 lines
1
---
2
name: css-architecture
3
description: >
4
Organize CSS using BEM, SMACSS, and CSS-in-JS patterns. Use when building
5
scalable, maintainable styling systems with proper naming conventions.
6
---
7
8
# CSS Architecture
9
10
## Table of Contents
11
12
- [Overview](#overview)
13
- [When to Use](#when-to-use)
14
- [Quick Start](#quick-start)
15
- [Reference Guides](#reference-guides)
16
- [Best Practices](#best-practices)
17
18
## Overview
19
20
Build maintainable CSS systems using methodologies like BEM (Block Element Modifier), SMACSS, and CSS-in-JS patterns with proper organization and conventions.
21
22
## When to Use
23
24
- Large-scale stylesheets
25
- Component-based styling
26
- Design system development
27
- Multiple team collaboration
28
- CSS scalability and reusability
29
30
## Quick Start
31
32
Minimal working example:
33
34
```css
35
/* Block - standalone component */
36
.button {
37
display: inline-block;
38
padding: 10px 20px;
39
border: none;
40
border-radius: 4px;
41
cursor: pointer;
42
font-size: 16px;
43
transition: all 0.3s ease;
44
}
45
46
/* Element - component part */
47
.button__icon {
48
margin-right: 8px;
49
vertical-align: middle;
50
}
51
52
/* Modifier - variant */
53
.button--primary {
54
background-color: #007bff;
55
color: white;
56
}
57
58
.button--primary:hover {
59
background-color: #0056b3;
60
// ... (see reference guides for full implementation)
61
```
62
63
## Reference Guides
64
65
Detailed implementations in the `references/` directory:
66
67
| Guide | Contents |
68
|---|---|
69
| [BEM (Block Element Modifier) Pattern](references/bem-block-element-modifier-pattern.md) | BEM (Block Element Modifier) Pattern |
70
| [SMACSS (Scalable and Modular Architecture for CSS)](references/smacss-scalable-and-modular-architecture-for-css.md) | SMACSS (Scalable and Modular Architecture for CSS) |
71
| [CSS-in-JS with Styled Components](references/css-in-js-with-styled-components.md) | CSS-in-JS with Styled Components |
72
| [CSS Variables (Custom Properties)](references/css-variables-custom-properties.md) | CSS Variables (Custom Properties) |
73
| [Utility-First CSS (Tailwind Pattern)](references/utility-first-css-tailwind-pattern.md) | Utility-First CSS (Tailwind Pattern) |
74
75
## Best Practices
76
77
### ✅ DO
78
79
- Follow established patterns and conventions
80
- Write clean, maintainable code
81
- Add appropriate documentation
82
- Test thoroughly before deploying
83
84
### ❌ DON'T
85
86
- Skip testing or validation
87
- Ignore error handling
88
- Hard-code configuration values
89

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 11,971 prompts

More by @OpenSourceBuffGuy

See all
Paris Shopfront Editorial Portrait prompt image

Paris Shopfront Editorial Portrait

Generates a moody film-scanned editorial portrait of a young woman in an oversized leather coat outside a vintage Paris wine shop at dusk.

image-prompt, nano-banana, negative-prompt, portrait, woman, medium-shot, editorial, fashion, film-grain, muted-colors, cinematic, photorealistic, vertical-format, text-rendering, soft-lighting, moody, bokeh, cityscape

Pastel autumn outfit lookbook with handwritten annotations prompt image

Pastel autumn outfit lookbook with handwritten annotations

Creates a pastel e-commerce fashion lookbook poster of a model in a simple autumn outfit, with handwritten labels, arrows and a bold headline.

image-prompt, fashion, fashion-shoot, poster, text-rendering, pastel, autumn, full-body, woman, minimalist, negative-space, vertical-format, gpt-image, product-photography, social-media-graphic, photorealistic, for-online-sellers, for-designers, portrait, editorial, whimsical, cozy, studio-lighting

Premium food photography template prompt image

Premium food photography template

Creates a steaming, glossy spicy Sichuan-style dish photo in a dark bowl with chilies and restaurant props, with the food and ratio left to fill in.

image-prompt, gpt-image, food-photography, photorealistic, cinematic, moody, dramatic-lighting, bokeh, close-up, high-angle, square-format, placeholders, template, negative-prompt, cooking, restaurants, product-photography, for-photographers, for-small-business-owners, for-online-sellers, advertising

Reviews

Loading reviews…

Discussion

Loading comments…