ccg-workflow 1.8.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/shared/{ccg-workflow.B1RHp04H.mjs → ccg-workflow.iK6lgCG3.mjs} +204 -6
- package/package.json +1 -1
- package/templates/commands/agents/team-architect.md +97 -0
- package/templates/commands/agents/team-qa.md +121 -0
- package/templates/commands/agents/team-reviewer.md +112 -0
- package/templates/output-styles/abyss-command.md +56 -0
- package/templates/output-styles/abyss-concise.md +89 -0
- package/templates/output-styles/abyss-ritual.md +70 -0
- package/templates/rules/ccg-skill-routing.md +83 -0
- package/templates/skills/domains/ai/SKILL.md +34 -0
- package/templates/skills/domains/ai/agent-dev.md +242 -0
- package/templates/skills/domains/ai/llm-security.md +288 -0
- package/templates/skills/domains/ai/prompt-and-eval.md +279 -0
- package/templates/skills/domains/ai/rag-system.md +542 -0
- package/templates/skills/domains/architecture/SKILL.md +42 -0
- package/templates/skills/domains/architecture/api-design.md +225 -0
- package/templates/skills/domains/architecture/caching.md +299 -0
- package/templates/skills/domains/architecture/cloud-native.md +285 -0
- package/templates/skills/domains/architecture/message-queue.md +329 -0
- package/templates/skills/domains/architecture/security-arch.md +297 -0
- package/templates/skills/domains/data-engineering/SKILL.md +207 -0
- package/templates/skills/domains/development/SKILL.md +46 -0
- package/templates/skills/domains/development/cpp.md +246 -0
- package/templates/skills/domains/development/go.md +323 -0
- package/templates/skills/domains/development/java.md +277 -0
- package/templates/skills/domains/development/python.md +288 -0
- package/templates/skills/domains/development/rust.md +313 -0
- package/templates/skills/domains/development/shell.md +313 -0
- package/templates/skills/domains/development/typescript.md +277 -0
- package/templates/skills/domains/devops/SKILL.md +39 -0
- package/templates/skills/domains/devops/cost-optimization.md +272 -0
- package/templates/skills/domains/devops/database.md +217 -0
- package/templates/skills/domains/devops/devsecops.md +198 -0
- package/templates/skills/domains/devops/git-workflow.md +181 -0
- package/templates/skills/domains/devops/observability.md +280 -0
- package/templates/skills/domains/devops/performance.md +336 -0
- package/templates/skills/domains/devops/testing.md +283 -0
- package/templates/skills/domains/frontend-design/SKILL.md +242 -0
- package/templates/skills/domains/frontend-design/agents/openai.yaml +4 -0
- package/templates/skills/domains/frontend-design/claymorphism/SKILL.md +119 -0
- package/templates/skills/domains/frontend-design/claymorphism/references/tokens.css +52 -0
- package/templates/skills/domains/frontend-design/component-patterns.md +202 -0
- package/templates/skills/domains/frontend-design/engineering.md +287 -0
- package/templates/skills/domains/frontend-design/glassmorphism/SKILL.md +140 -0
- package/templates/skills/domains/frontend-design/glassmorphism/references/tokens.css +32 -0
- package/templates/skills/domains/frontend-design/liquid-glass/SKILL.md +137 -0
- package/templates/skills/domains/frontend-design/liquid-glass/references/tokens.css +81 -0
- package/templates/skills/domains/frontend-design/neubrutalism/SKILL.md +143 -0
- package/templates/skills/domains/frontend-design/neubrutalism/references/tokens.css +44 -0
- package/templates/skills/domains/frontend-design/reference/color-and-contrast.md +132 -0
- package/templates/skills/domains/frontend-design/reference/interaction-design.md +195 -0
- package/templates/skills/domains/frontend-design/reference/motion-design.md +99 -0
- package/templates/skills/domains/frontend-design/reference/responsive-design.md +114 -0
- package/templates/skills/domains/frontend-design/reference/spatial-design.md +100 -0
- package/templates/skills/domains/frontend-design/reference/typography.md +133 -0
- package/templates/skills/domains/frontend-design/reference/ux-writing.md +107 -0
- package/templates/skills/domains/frontend-design/state-management.md +680 -0
- package/templates/skills/domains/frontend-design/ui-aesthetics.md +110 -0
- package/templates/skills/domains/frontend-design/ux-principles.md +156 -0
- package/templates/skills/domains/infrastructure/SKILL.md +200 -0
- package/templates/skills/domains/mobile/SKILL.md +224 -0
- package/templates/skills/domains/orchestration/SKILL.md +29 -0
- package/templates/skills/domains/orchestration/multi-agent.md +263 -0
- package/templates/skills/domains/security/SKILL.md +72 -0
- package/templates/skills/domains/security/blue-team.md +436 -0
- package/templates/skills/domains/security/code-audit.md +265 -0
- package/templates/skills/domains/security/pentest.md +226 -0
- package/templates/skills/domains/security/red-team.md +374 -0
- package/templates/skills/domains/security/threat-intel.md +372 -0
- package/templates/skills/domains/security/vuln-research.md +369 -0
- package/templates/skills/impeccable/adapt/SKILL.md +199 -0
- package/templates/skills/impeccable/animate/SKILL.md +174 -0
- package/templates/skills/impeccable/arrange/SKILL.md +124 -0
- package/templates/skills/impeccable/audit/SKILL.md +147 -0
- package/templates/skills/impeccable/bolder/SKILL.md +116 -0
- package/templates/skills/impeccable/clarify/SKILL.md +183 -0
- package/templates/skills/impeccable/colorize/SKILL.md +142 -0
- package/templates/skills/impeccable/critique/SKILL.md +201 -0
- package/templates/skills/impeccable/critique/reference/cognitive-load.md +106 -0
- package/templates/skills/impeccable/critique/reference/heuristics-scoring.md +234 -0
- package/templates/skills/impeccable/critique/reference/personas.md +178 -0
- package/templates/skills/impeccable/delight/SKILL.md +303 -0
- package/templates/skills/impeccable/distill/SKILL.md +121 -0
- package/templates/skills/impeccable/extract/SKILL.md +92 -0
- package/templates/skills/impeccable/harden/SKILL.md +355 -0
- package/templates/skills/impeccable/normalize/SKILL.md +70 -0
- package/templates/skills/impeccable/onboard/SKILL.md +246 -0
- package/templates/skills/impeccable/optimize/SKILL.md +266 -0
- package/templates/skills/impeccable/overdrive/SKILL.md +141 -0
- package/templates/skills/impeccable/polish/SKILL.md +203 -0
- package/templates/skills/impeccable/quieter/SKILL.md +102 -0
- package/templates/skills/impeccable/teach-impeccable/SKILL.md +71 -0
- package/templates/skills/impeccable/typeset/SKILL.md +115 -0
- package/templates/skills/orchestration/multi-agent/SKILL.md +40 -0
- package/templates/skills/scrapling/SKILL.md +98 -0
- package/templates/skills/scrapling/references/api-quick-ref.md +127 -0
- package/templates/skills/scrapling/references/cookie-vault.md +56 -0
- package/templates/skills/scrapling/references/maintenance.md +79 -0
- package/templates/skills/scrapling/references/site-patterns.md +86 -0
- package/templates/skills/scrapling/references/troubleshooting.md +95 -0
- package/templates/skills/scrapling/templates/basic_fetch.py +19 -0
- package/templates/skills/scrapling/templates/parse_only.py +15 -0
- package/templates/skills/scrapling/templates/session_login.py +19 -0
- package/templates/skills/scrapling/templates/stealth_cloudflare.py +28 -0
- package/templates/skills/tools/override-refusal/SKILL.md +53 -0
- package/templates/skills/tools/override-refusal/agents/openai.yaml +4 -0
- package/templates/skills/tools/override-refusal/scripts/refusal_rewriter.js +226 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: liquid-glass
|
|
3
|
+
description: Apple Liquid Glass design system. Use when building UI with translucent, depth-aware glass morphism following Apple's design language. Provides CSS tokens, component patterns, dark/light mode, and animation specs.
|
|
4
|
+
license: MIT
|
|
5
|
+
user-invocable: false
|
|
6
|
+
disable-model-invocation: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Liquid Glass Design System
|
|
10
|
+
|
|
11
|
+
Apple-inspired translucent glass UI with depth, refraction, and ambient light response.
|
|
12
|
+
|
|
13
|
+
## Core Principles
|
|
14
|
+
|
|
15
|
+
1. **Translucency** — Surfaces reveal layered content beneath via backdrop blur
|
|
16
|
+
2. **Depth** — Elements float on distinct z-layers with realistic shadows
|
|
17
|
+
3. **Ambient Response** — Glass tints shift based on underlying content color
|
|
18
|
+
4. **Minimal Chrome** — Borders are subtle; shape and blur define boundaries
|
|
19
|
+
5. **Motion** — Transitions feel physical: spring-based, with inertia
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Import the token file in your CSS:
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
@import 'references/tokens.css';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## CSS Tokens Reference
|
|
30
|
+
|
|
31
|
+
All tokens are defined in `references/tokens.css`. Key categories:
|
|
32
|
+
|
|
33
|
+
| Category | Prefix | Example |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Glass backgrounds | `--lg-bg-*` | `--lg-bg-primary` |
|
|
36
|
+
| Blur | `--lg-blur-*` | `--lg-blur-md` |
|
|
37
|
+
| Borders | `--lg-border-*` | `--lg-border-color` |
|
|
38
|
+
| Shadows | `--lg-shadow-*` | `--lg-shadow-elevated` |
|
|
39
|
+
| Radius | `--lg-radius-*` | `--lg-radius-lg` |
|
|
40
|
+
| Animation | `--lg-duration-*` | `--lg-duration-normal` |
|
|
41
|
+
|
|
42
|
+
## Component Patterns
|
|
43
|
+
|
|
44
|
+
### Glass Card
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
.glass-card {
|
|
48
|
+
background: var(--lg-bg-primary);
|
|
49
|
+
backdrop-filter: blur(var(--lg-blur-md));
|
|
50
|
+
-webkit-backdrop-filter: blur(var(--lg-blur-md));
|
|
51
|
+
border: 1px solid var(--lg-border-color);
|
|
52
|
+
border-radius: var(--lg-radius-lg);
|
|
53
|
+
box-shadow: var(--lg-shadow-elevated);
|
|
54
|
+
transition: transform var(--lg-duration-normal) var(--lg-easing-spring);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.glass-card:hover {
|
|
58
|
+
transform: translateY(-2px);
|
|
59
|
+
box-shadow: var(--lg-shadow-high);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Glass Toolbar
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
.glass-toolbar {
|
|
67
|
+
background: var(--lg-bg-toolbar);
|
|
68
|
+
backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
|
|
69
|
+
-webkit-backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
|
|
70
|
+
border-bottom: 1px solid var(--lg-border-subtle);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Glass Button
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
.glass-btn {
|
|
78
|
+
background: var(--lg-bg-interactive);
|
|
79
|
+
backdrop-filter: blur(var(--lg-blur-sm));
|
|
80
|
+
border: 1px solid var(--lg-border-color);
|
|
81
|
+
border-radius: var(--lg-radius-md);
|
|
82
|
+
transition: all var(--lg-duration-fast) var(--lg-easing-spring);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.glass-btn:active {
|
|
86
|
+
transform: scale(0.97);
|
|
87
|
+
background: var(--lg-bg-pressed);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Glass Modal Overlay
|
|
92
|
+
|
|
93
|
+
```css
|
|
94
|
+
.glass-overlay {
|
|
95
|
+
background: var(--lg-bg-scrim);
|
|
96
|
+
backdrop-filter: blur(var(--lg-blur-xl));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.glass-modal {
|
|
100
|
+
background: var(--lg-bg-elevated);
|
|
101
|
+
border: 1px solid var(--lg-border-color);
|
|
102
|
+
border-radius: var(--lg-radius-xl);
|
|
103
|
+
box-shadow: var(--lg-shadow-high);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Dark / Light Mode
|
|
108
|
+
|
|
109
|
+
Tokens auto-switch via `prefers-color-scheme`. Light mode uses white-tinted glass; dark mode uses dark-tinted glass with higher blur to maintain readability.
|
|
110
|
+
|
|
111
|
+
```css
|
|
112
|
+
/* Force a mode on a subtree */
|
|
113
|
+
.light-glass { color-scheme: light; }
|
|
114
|
+
.dark-glass { color-scheme: dark; }
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Animations
|
|
118
|
+
|
|
119
|
+
Use spring-based easing for physical feel:
|
|
120
|
+
|
|
121
|
+
```css
|
|
122
|
+
/* Entry */
|
|
123
|
+
@keyframes glass-enter {
|
|
124
|
+
from { opacity: 0; transform: scale(0.95) translateY(8px); }
|
|
125
|
+
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.glass-animate-in {
|
|
129
|
+
animation: glass-enter var(--lg-duration-normal) var(--lg-easing-spring) both;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Accessibility
|
|
134
|
+
|
|
135
|
+
- Ensure `contrast-ratio ≥ 4.5:1` for text over glass surfaces
|
|
136
|
+
- Respect `prefers-reduced-motion` — disable blur animations, use opacity-only transitions
|
|
137
|
+
- Provide `prefers-contrast: high` overrides that replace translucent backgrounds with solid ones
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* Liquid Glass Design Tokens */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
color-scheme: light dark;
|
|
5
|
+
|
|
6
|
+
/* Blur */
|
|
7
|
+
--lg-blur-sm: 8px;
|
|
8
|
+
--lg-blur-md: 16px;
|
|
9
|
+
--lg-blur-lg: 32px;
|
|
10
|
+
--lg-blur-xl: 48px;
|
|
11
|
+
|
|
12
|
+
/* Saturation */
|
|
13
|
+
--lg-saturate: 1.8;
|
|
14
|
+
|
|
15
|
+
/* Radius */
|
|
16
|
+
--lg-radius-sm: 8px;
|
|
17
|
+
--lg-radius-md: 12px;
|
|
18
|
+
--lg-radius-lg: 16px;
|
|
19
|
+
--lg-radius-xl: 24px;
|
|
20
|
+
|
|
21
|
+
/* Shadows */
|
|
22
|
+
--lg-shadow-subtle: 0 1px 3px rgba(0,0,0,0.08);
|
|
23
|
+
--lg-shadow-elevated: 0 4px 16px rgba(0,0,0,0.1);
|
|
24
|
+
--lg-shadow-high: 0 8px 32px rgba(0,0,0,0.15);
|
|
25
|
+
|
|
26
|
+
/* Animation */
|
|
27
|
+
--lg-duration-fast: 150ms;
|
|
28
|
+
--lg-duration-normal: 300ms;
|
|
29
|
+
--lg-duration-slow: 500ms;
|
|
30
|
+
--lg-easing-spring: cubic-bezier(0.22, 1, 0.36, 1);
|
|
31
|
+
|
|
32
|
+
/* Light mode (default) */
|
|
33
|
+
--lg-bg-primary: rgba(255,255,255,0.72);
|
|
34
|
+
--lg-bg-elevated: rgba(255,255,255,0.82);
|
|
35
|
+
--lg-bg-toolbar: rgba(255,255,255,0.65);
|
|
36
|
+
--lg-bg-interactive: rgba(255,255,255,0.5);
|
|
37
|
+
--lg-bg-pressed: rgba(255,255,255,0.35);
|
|
38
|
+
--lg-bg-scrim: rgba(0,0,0,0.25);
|
|
39
|
+
--lg-border-color: rgba(255,255,255,0.45);
|
|
40
|
+
--lg-border-subtle: rgba(0,0,0,0.06);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (prefers-color-scheme: dark) {
|
|
44
|
+
:root {
|
|
45
|
+
--lg-bg-primary: rgba(30,30,30,0.65);
|
|
46
|
+
--lg-bg-elevated: rgba(40,40,40,0.75);
|
|
47
|
+
--lg-bg-toolbar: rgba(25,25,25,0.6);
|
|
48
|
+
--lg-bg-interactive: rgba(255,255,255,0.1);
|
|
49
|
+
--lg-bg-pressed: rgba(255,255,255,0.06);
|
|
50
|
+
--lg-bg-scrim: rgba(0,0,0,0.5);
|
|
51
|
+
--lg-border-color: rgba(255,255,255,0.12);
|
|
52
|
+
--lg-border-subtle: rgba(255,255,255,0.06);
|
|
53
|
+
--lg-shadow-subtle: 0 1px 3px rgba(0,0,0,0.3);
|
|
54
|
+
--lg-shadow-elevated: 0 4px 16px rgba(0,0,0,0.4);
|
|
55
|
+
--lg-shadow-high: 0 8px 32px rgba(0,0,0,0.5);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (prefers-contrast: high) {
|
|
60
|
+
:root {
|
|
61
|
+
--lg-bg-primary: rgba(255,255,255,0.95);
|
|
62
|
+
--lg-bg-elevated: rgba(255,255,255,0.98);
|
|
63
|
+
--lg-border-color: rgba(0,0,0,0.3);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (prefers-contrast: high) and (prefers-color-scheme: dark) {
|
|
68
|
+
:root {
|
|
69
|
+
--lg-bg-primary: rgba(20,20,20,0.95);
|
|
70
|
+
--lg-bg-elevated: rgba(25,25,25,0.98);
|
|
71
|
+
--lg-border-color: rgba(255,255,255,0.3);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media (prefers-reduced-motion: reduce) {
|
|
76
|
+
:root {
|
|
77
|
+
--lg-duration-fast: 0ms;
|
|
78
|
+
--lg-duration-normal: 0ms;
|
|
79
|
+
--lg-duration-slow: 0ms;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neubrutalism
|
|
3
|
+
description: Neubrutalism design system skill. Use when building bold UI with thick borders, offset solid shadows, high saturation colors, and minimal border radius.
|
|
4
|
+
license: MIT
|
|
5
|
+
user-invocable: false
|
|
6
|
+
disable-model-invocation: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Neubrutalism Design Spec
|
|
10
|
+
|
|
11
|
+
## Core Principles
|
|
12
|
+
|
|
13
|
+
1. **Thick Borders** — Bold `3–5px solid` black outlines on all elements
|
|
14
|
+
2. **Offset Solid Shadows** — Hard-edge `box-shadow` with zero blur (e.g. `5px 5px 0 #000`)
|
|
15
|
+
3. **High Saturation Colors** — Vivid, punchy fills: pinks, yellows, blues, greens
|
|
16
|
+
4. **Minimal Radius** — `0–8px` border-radius; sharp or barely rounded corners
|
|
17
|
+
5. **Flat Aesthetic** — No gradients, no blur, no transparency
|
|
18
|
+
|
|
19
|
+
## CSS Tokens
|
|
20
|
+
|
|
21
|
+
Reference: [references/tokens.css](references/tokens.css)
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
@import 'references/tokens.css';
|
|
25
|
+
|
|
26
|
+
.nb-card {
|
|
27
|
+
background: var(--nb-yellow);
|
|
28
|
+
border: var(--nb-border-thick);
|
|
29
|
+
border-radius: var(--nb-radius);
|
|
30
|
+
box-shadow: var(--nb-shadow);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Component Examples
|
|
35
|
+
|
|
36
|
+
### Card
|
|
37
|
+
```css
|
|
38
|
+
.nb-card {
|
|
39
|
+
background: var(--nb-white);
|
|
40
|
+
border: var(--nb-border-thick);
|
|
41
|
+
border-radius: var(--nb-radius);
|
|
42
|
+
box-shadow: var(--nb-shadow);
|
|
43
|
+
padding: 1.5rem;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Button
|
|
48
|
+
```css
|
|
49
|
+
.nb-btn {
|
|
50
|
+
background: var(--nb-yellow);
|
|
51
|
+
border: var(--nb-border);
|
|
52
|
+
border-radius: var(--nb-radius);
|
|
53
|
+
box-shadow: var(--nb-shadow-sm);
|
|
54
|
+
padding: 0.6rem 1.4rem;
|
|
55
|
+
font-family: var(--nb-font);
|
|
56
|
+
font-weight: var(--nb-font-weight);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
transition: transform 0.1s, box-shadow 0.1s;
|
|
59
|
+
}
|
|
60
|
+
.nb-btn:hover {
|
|
61
|
+
transform: translate(-2px, -2px);
|
|
62
|
+
box-shadow: var(--nb-shadow);
|
|
63
|
+
}
|
|
64
|
+
.nb-btn:active {
|
|
65
|
+
transform: translate(3px, 3px);
|
|
66
|
+
box-shadow: none;
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Navbar
|
|
71
|
+
```css
|
|
72
|
+
.nb-nav {
|
|
73
|
+
background: var(--nb-bg);
|
|
74
|
+
border-bottom: var(--nb-border-thick);
|
|
75
|
+
padding: 1rem 2rem;
|
|
76
|
+
position: sticky;
|
|
77
|
+
top: 0;
|
|
78
|
+
z-index: 100;
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Input
|
|
83
|
+
```css
|
|
84
|
+
.nb-input {
|
|
85
|
+
background: var(--nb-white);
|
|
86
|
+
border: var(--nb-border);
|
|
87
|
+
border-radius: var(--nb-radius);
|
|
88
|
+
box-shadow: var(--nb-shadow-sm);
|
|
89
|
+
padding: 0.6rem 1rem;
|
|
90
|
+
font-family: var(--nb-font);
|
|
91
|
+
font-weight: var(--nb-font-weight-body);
|
|
92
|
+
}
|
|
93
|
+
.nb-input:focus {
|
|
94
|
+
outline: none;
|
|
95
|
+
box-shadow: var(--nb-shadow);
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Badge
|
|
100
|
+
```css
|
|
101
|
+
.nb-badge {
|
|
102
|
+
background: var(--nb-pink);
|
|
103
|
+
border: var(--nb-border);
|
|
104
|
+
border-radius: var(--nb-radius);
|
|
105
|
+
padding: 0.2rem 0.8rem;
|
|
106
|
+
font-family: var(--nb-font);
|
|
107
|
+
font-weight: var(--nb-font-weight);
|
|
108
|
+
font-size: 0.85rem;
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Typography
|
|
113
|
+
|
|
114
|
+
- Use bold, geometric sans-serif fonts (Space Grotesk, Inter, etc.)
|
|
115
|
+
- Headings: `font-weight: 700`, `letter-spacing: -0.02em`
|
|
116
|
+
- Body: `font-weight: 500`
|
|
117
|
+
- Uppercase sparingly for labels/badges
|
|
118
|
+
|
|
119
|
+
```css
|
|
120
|
+
h1, h2, h3 {
|
|
121
|
+
font-family: var(--nb-font-heading);
|
|
122
|
+
font-weight: var(--nb-font-weight);
|
|
123
|
+
letter-spacing: var(--nb-letter-spacing);
|
|
124
|
+
}
|
|
125
|
+
body {
|
|
126
|
+
font-family: var(--nb-font);
|
|
127
|
+
font-weight: var(--nb-font-weight-body);
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Accessibility Notes
|
|
132
|
+
|
|
133
|
+
- Thick borders provide strong visual boundaries — good for low-vision users
|
|
134
|
+
- Ensure color contrast ≥ 4.5:1 for text on colored backgrounds
|
|
135
|
+
- Active/hover states use `transform` shifts — provide `prefers-reduced-motion` fallback
|
|
136
|
+
|
|
137
|
+
```css
|
|
138
|
+
@media (prefers-reduced-motion: reduce) {
|
|
139
|
+
.nb-btn:hover, .nb-btn:active {
|
|
140
|
+
transform: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Borders */
|
|
3
|
+
--nb-border: 3px solid #000;
|
|
4
|
+
--nb-border-thick: 5px solid #000;
|
|
5
|
+
|
|
6
|
+
/* Shadows (offset solid, no blur) */
|
|
7
|
+
--nb-shadow-sm: 3px 3px 0 #000;
|
|
8
|
+
--nb-shadow: 5px 5px 0 #000;
|
|
9
|
+
--nb-shadow-lg: 8px 8px 0 #000;
|
|
10
|
+
|
|
11
|
+
/* Radius */
|
|
12
|
+
--nb-radius: 4px;
|
|
13
|
+
--nb-radius-lg: 8px;
|
|
14
|
+
|
|
15
|
+
/* Colors — high saturation */
|
|
16
|
+
--nb-pink: #ff6b9d;
|
|
17
|
+
--nb-yellow: #ffd43b;
|
|
18
|
+
--nb-blue: #4dabf7;
|
|
19
|
+
--nb-green: #51cf66;
|
|
20
|
+
--nb-orange: #ff922b;
|
|
21
|
+
--nb-purple: #cc5de8;
|
|
22
|
+
--nb-red: #ff6b6b;
|
|
23
|
+
--nb-white: #fff;
|
|
24
|
+
--nb-black: #000;
|
|
25
|
+
--nb-bg: #f5f0e8;
|
|
26
|
+
|
|
27
|
+
/* Typography */
|
|
28
|
+
--nb-font: 'Space Grotesk', 'Inter', system-ui, sans-serif;
|
|
29
|
+
--nb-font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
|
|
30
|
+
--nb-font-weight: 700;
|
|
31
|
+
--nb-font-weight-body: 500;
|
|
32
|
+
--nb-letter-spacing: -0.02em;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-theme="dark"] {
|
|
36
|
+
--nb-border: 3px solid #fff;
|
|
37
|
+
--nb-border-thick: 5px solid #fff;
|
|
38
|
+
--nb-shadow-sm: 3px 3px 0 #fff;
|
|
39
|
+
--nb-shadow: 5px 5px 0 #fff;
|
|
40
|
+
--nb-shadow-lg: 8px 8px 0 #fff;
|
|
41
|
+
--nb-bg: #1a1a2e;
|
|
42
|
+
--nb-black: #fff;
|
|
43
|
+
--nb-white: #1a1a2e;
|
|
44
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Color & Contrast
|
|
2
|
+
|
|
3
|
+
## Color Spaces: Use OKLCH
|
|
4
|
+
|
|
5
|
+
**Stop using HSL.** Use OKLCH (or LCH) instead. It's perceptually uniform, meaning equal steps in lightness *look* equal—unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark.
|
|
6
|
+
|
|
7
|
+
```css
|
|
8
|
+
/* OKLCH: lightness (0-100%), chroma (0-0.4+), hue (0-360) */
|
|
9
|
+
--color-primary: oklch(60% 0.15 250); /* Blue */
|
|
10
|
+
--color-primary-light: oklch(85% 0.08 250); /* Same hue, lighter */
|
|
11
|
+
--color-primary-dark: oklch(35% 0.12 250); /* Same hue, darker */
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Key insight**: As you move toward white or black, reduce chroma (saturation). High chroma at extreme lightness looks garish. A light blue at 85% lightness needs ~0.08 chroma, not the 0.15 of your base color.
|
|
15
|
+
|
|
16
|
+
## Building Functional Palettes
|
|
17
|
+
|
|
18
|
+
### The Tinted Neutral Trap
|
|
19
|
+
|
|
20
|
+
**Pure gray is dead.** Add a subtle hint of your brand hue to all neutrals:
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
/* Dead grays */
|
|
24
|
+
--gray-100: oklch(95% 0 0); /* No personality */
|
|
25
|
+
--gray-900: oklch(15% 0 0);
|
|
26
|
+
|
|
27
|
+
/* Warm-tinted grays (add brand warmth) */
|
|
28
|
+
--gray-100: oklch(95% 0.01 60); /* Hint of warmth */
|
|
29
|
+
--gray-900: oklch(15% 0.01 60);
|
|
30
|
+
|
|
31
|
+
/* Cool-tinted grays (tech, professional) */
|
|
32
|
+
--gray-100: oklch(95% 0.01 250); /* Hint of blue */
|
|
33
|
+
--gray-900: oklch(15% 0.01 250);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The chroma is tiny (0.01) but perceptible. It creates subconscious cohesion between your brand color and your UI.
|
|
37
|
+
|
|
38
|
+
### Palette Structure
|
|
39
|
+
|
|
40
|
+
A complete system needs:
|
|
41
|
+
|
|
42
|
+
| Role | Purpose | Example |
|
|
43
|
+
|------|---------|---------|
|
|
44
|
+
| **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades |
|
|
45
|
+
| **Neutral** | Text, backgrounds, borders | 9-11 shade scale |
|
|
46
|
+
| **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each |
|
|
47
|
+
| **Surface** | Cards, modals, overlays | 2-3 elevation levels |
|
|
48
|
+
|
|
49
|
+
**Skip secondary/tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise.
|
|
50
|
+
|
|
51
|
+
### The 60-30-10 Rule (Applied Correctly)
|
|
52
|
+
|
|
53
|
+
This rule is about **visual weight**, not pixel count:
|
|
54
|
+
|
|
55
|
+
- **60%**: Neutral backgrounds, white space, base surfaces
|
|
56
|
+
- **30%**: Secondary colors—text, borders, inactive states
|
|
57
|
+
- **10%**: Accent—CTAs, highlights, focus states
|
|
58
|
+
|
|
59
|
+
The common mistake: using the accent color everywhere because it's "the brand color." Accent colors work *because* they're rare. Overuse kills their power.
|
|
60
|
+
|
|
61
|
+
## Contrast & Accessibility
|
|
62
|
+
|
|
63
|
+
### WCAG Requirements
|
|
64
|
+
|
|
65
|
+
| Content Type | AA Minimum | AAA Target |
|
|
66
|
+
|--------------|------------|------------|
|
|
67
|
+
| Body text | 4.5:1 | 7:1 |
|
|
68
|
+
| Large text (18px+ or 14px bold) | 3:1 | 4.5:1 |
|
|
69
|
+
| UI components, icons | 3:1 | 4.5:1 |
|
|
70
|
+
| Non-essential decorations | None | None |
|
|
71
|
+
|
|
72
|
+
**The gotcha**: Placeholder text still needs 4.5:1. That light gray placeholder you see everywhere? Usually fails WCAG.
|
|
73
|
+
|
|
74
|
+
### Dangerous Color Combinations
|
|
75
|
+
|
|
76
|
+
These commonly fail contrast or cause readability issues:
|
|
77
|
+
|
|
78
|
+
- Light gray text on white (the #1 accessibility fail)
|
|
79
|
+
- **Gray text on any colored background**—gray looks washed out and dead on color. Use a darker shade of the background color, or transparency
|
|
80
|
+
- Red text on green background (or vice versa)—8% of men can't distinguish these
|
|
81
|
+
- Blue text on red background (vibrates visually)
|
|
82
|
+
- Yellow text on white (almost always fails)
|
|
83
|
+
- Thin light text on images (unpredictable contrast)
|
|
84
|
+
|
|
85
|
+
### Never Use Pure Gray or Pure Black
|
|
86
|
+
|
|
87
|
+
Pure gray (`oklch(50% 0 0)`) and pure black (`#000`) don't exist in nature—real shadows and surfaces always have a color cast. Even a chroma of 0.005-0.01 is enough to feel natural without being obviously tinted. (See tinted neutrals example above.)
|
|
88
|
+
|
|
89
|
+
### Testing
|
|
90
|
+
|
|
91
|
+
Don't trust your eyes. Use tools:
|
|
92
|
+
|
|
93
|
+
- [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
|
|
94
|
+
- Browser DevTools → Rendering → Emulate vision deficiencies
|
|
95
|
+
- [Polypane](https://polypane.app/) for real-time testing
|
|
96
|
+
|
|
97
|
+
## Theming: Light & Dark Mode
|
|
98
|
+
|
|
99
|
+
### Dark Mode Is Not Inverted Light Mode
|
|
100
|
+
|
|
101
|
+
You can't just swap colors. Dark mode requires different design decisions:
|
|
102
|
+
|
|
103
|
+
| Light Mode | Dark Mode |
|
|
104
|
+
|------------|-----------|
|
|
105
|
+
| Shadows for depth | Lighter surfaces for depth (no shadows) |
|
|
106
|
+
| Dark text on light | Light text on dark (reduce font weight) |
|
|
107
|
+
| Vibrant accents | Desaturate accents slightly |
|
|
108
|
+
| White backgrounds | Never pure black—use dark gray (oklch 12-18%) |
|
|
109
|
+
|
|
110
|
+
```css
|
|
111
|
+
/* Dark mode depth via surface color, not shadow */
|
|
112
|
+
:root[data-theme="dark"] {
|
|
113
|
+
--surface-1: oklch(15% 0.01 250);
|
|
114
|
+
--surface-2: oklch(20% 0.01 250); /* "Higher" = lighter */
|
|
115
|
+
--surface-3: oklch(25% 0.01 250);
|
|
116
|
+
|
|
117
|
+
/* Reduce text weight slightly */
|
|
118
|
+
--body-weight: 350; /* Instead of 400 */
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Token Hierarchy
|
|
123
|
+
|
|
124
|
+
Use two layers: primitive tokens (`--blue-500`) and semantic tokens (`--color-primary: var(--blue-500)`). For dark mode, only redefine the semantic layer—primitives stay the same.
|
|
125
|
+
|
|
126
|
+
## Alpha Is A Design Smell
|
|
127
|
+
|
|
128
|
+
Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
**Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Using pure black (#000) for large areas. Skipping color blindness testing (8% of men affected).
|