@whykusanagi/corrupted-theme 0.1.2 → 0.1.3
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/CHANGELOG.md +133 -0
- package/README.md +6 -0
- package/docs/CAPABILITIES.md +209 -0
- package/docs/CHARACTER_LEVEL_CORRUPTION.md +264 -0
- package/docs/CORRUPTION_PHRASES.md +529 -0
- package/docs/FUTURE_WORK.md +189 -0
- package/docs/IMPLEMENTATION_VALIDATION.md +401 -0
- package/docs/LLM_PROVIDERS.md +345 -0
- package/docs/PERSONALITY.md +128 -0
- package/docs/ROADMAP.md +266 -0
- package/docs/ROUTING.md +324 -0
- package/docs/STYLE_GUIDE.md +605 -0
- package/docs/brand/BRAND_OVERVIEW.md +413 -0
- package/docs/brand/COLOR_SYSTEM.md +583 -0
- package/docs/brand/DESIGN_TOKENS.md +1009 -0
- package/docs/brand/TRANSLATION_FAILURE_AESTHETIC.md +525 -0
- package/docs/brand/TYPOGRAPHY.md +624 -0
- package/docs/components/ANIMATION_GUIDELINES.md +901 -0
- package/docs/components/COMPONENT_LIBRARY.md +1061 -0
- package/docs/components/GLASSMORPHISM.md +602 -0
- package/docs/components/INTERACTIVE_STATES.md +766 -0
- package/docs/governance/CONTRIBUTION_GUIDELINES.md +593 -0
- package/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md +451 -0
- package/docs/governance/VERSION_MANAGEMENT.md +447 -0
- package/docs/governance/VERSION_REFERENCES.md +229 -0
- package/docs/platforms/CLI_IMPLEMENTATION.md +1025 -0
- package/docs/platforms/COMPONENT_MAPPING.md +579 -0
- package/docs/platforms/NPM_PACKAGE.md +854 -0
- package/docs/platforms/WEB_IMPLEMENTATION.md +1221 -0
- package/docs/standards/ACCESSIBILITY.md +715 -0
- package/docs/standards/ANTI_PATTERNS.md +554 -0
- package/docs/standards/SPACING_SYSTEM.md +549 -0
- package/examples/button.html +1 -1
- package/examples/card.html +1 -1
- package/examples/form.html +1 -1
- package/examples/index.html +2 -2
- package/examples/layout.html +1 -1
- package/examples/nikke-team-builder.html +1 -1
- package/examples/showcase-complete.html +840 -15
- package/examples/showcase.html +1 -1
- package/package.json +4 -2
- package/src/css/components.css +676 -0
- package/src/lib/character-corruption.js +563 -0
- package/src/lib/components.js +283 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
# Celeste Brand System - Glassmorphism
|
|
2
|
+
|
|
3
|
+
**Version**: 1.0.0
|
|
4
|
+
**Last Updated**: 2025-12-13
|
|
5
|
+
**Status**: 🟠 **HIGH PRIORITY DOCUMENT**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Glassmorphism is the **signature visual effect** of Celeste's brand identity. It creates depth, hierarchy, and premium feel through frosted glass surfaces with blur, transparency, and subtle borders.
|
|
12
|
+
|
|
13
|
+
**Key principle**: "See through, but not clearly" - content behind glass is visible but blurred, creating layered depth.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Core Glassmorphism Properties
|
|
18
|
+
|
|
19
|
+
All glass effects combine these four properties:
|
|
20
|
+
|
|
21
|
+
1. **Semi-transparent background** (`rgba()` with opacity)
|
|
22
|
+
2. **Backdrop blur** (`backdrop-filter: blur()`)
|
|
23
|
+
3. **Border** (subtle, often pink-tinted)
|
|
24
|
+
4. **Shadow** (pink-tinted glow)
|
|
25
|
+
|
|
26
|
+
### Anatomy
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
.glass-element {
|
|
30
|
+
/* 1. Semi-transparent background */
|
|
31
|
+
background: rgba(20, 12, 40, 0.7);
|
|
32
|
+
|
|
33
|
+
/* 2. Backdrop blur */
|
|
34
|
+
backdrop-filter: blur(15px);
|
|
35
|
+
-webkit-backdrop-filter: blur(15px); /* Safari support */
|
|
36
|
+
|
|
37
|
+
/* 3. Subtle border */
|
|
38
|
+
border: 1px solid rgba(217, 79, 144, 0.3);
|
|
39
|
+
|
|
40
|
+
/* 4. Pink-tinted shadow */
|
|
41
|
+
box-shadow: 0 4px 16px rgba(217, 79, 144, 0.25);
|
|
42
|
+
|
|
43
|
+
/* Bonus: Rounded corners */
|
|
44
|
+
border-radius: 12px;
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Three Depth Layers
|
|
51
|
+
|
|
52
|
+
Celeste uses **three depth layers** for visual hierarchy:
|
|
53
|
+
|
|
54
|
+
### Layer 1: Glass Default (Standard Depth)
|
|
55
|
+
|
|
56
|
+
**Use for**: Main content cards, dashboard sections, primary UI elements
|
|
57
|
+
|
|
58
|
+
```css
|
|
59
|
+
.glass-card {
|
|
60
|
+
background: rgba(20, 12, 40, 0.7); /* 70% opacity */
|
|
61
|
+
backdrop-filter: blur(15px); /* Medium blur */
|
|
62
|
+
border: 1px solid rgba(217, 79, 144, 0.3);
|
|
63
|
+
box-shadow: 0 4px 16px rgba(217, 79, 144, 0.25);
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Properties**:
|
|
68
|
+
- **Opacity**: 70% (0.7)
|
|
69
|
+
- **Blur**: 15px (medium)
|
|
70
|
+
- **Border opacity**: 30% (0.3)
|
|
71
|
+
- **Shadow**: Medium (0 4px 16px)
|
|
72
|
+
|
|
73
|
+
**Visual effect**: Solid enough to read content, blurred enough to see background
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Layer 2: Glass Light (Subtle Depth)
|
|
78
|
+
|
|
79
|
+
**Use for**: Hover states, nested elements, secondary cards
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
.glass-card:hover,
|
|
83
|
+
.glass-light {
|
|
84
|
+
background: rgba(28, 18, 48, 0.5); /* 50% opacity */
|
|
85
|
+
backdrop-filter: blur(10px); /* Light blur */
|
|
86
|
+
border: 1px solid rgba(217, 79, 144, 0.5);
|
|
87
|
+
box-shadow: 0 2px 8px rgba(217, 79, 144, 0.15);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Properties**:
|
|
92
|
+
- **Opacity**: 50% (0.5)
|
|
93
|
+
- **Blur**: 10px (light)
|
|
94
|
+
- **Border opacity**: 50% (0.5) - brighter on hover
|
|
95
|
+
- **Shadow**: Small (0 2px 8px)
|
|
96
|
+
|
|
97
|
+
**Visual effect**: More transparent, lighter feel, background more visible
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### Layer 3: Glass Darker (Elevated Depth)
|
|
102
|
+
|
|
103
|
+
**Use for**: Modals, dropdowns, elevated panels, focus states
|
|
104
|
+
|
|
105
|
+
```css
|
|
106
|
+
.glass-card:active,
|
|
107
|
+
.glass-darker {
|
|
108
|
+
background: rgba(12, 8, 28, 0.8); /* 80% opacity */
|
|
109
|
+
backdrop-filter: blur(20px); /* Heavy blur */
|
|
110
|
+
border: 1px solid rgba(217, 79, 144, 0.7);
|
|
111
|
+
box-shadow: 0 8px 32px rgba(217, 79, 144, 0.35);
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Properties**:
|
|
116
|
+
- **Opacity**: 80% (0.8)
|
|
117
|
+
- **Blur**: 20px (heavy)
|
|
118
|
+
- **Border opacity**: 70% (0.7)
|
|
119
|
+
- **Shadow**: Large (0 8px 32px)
|
|
120
|
+
|
|
121
|
+
**Visual effect**: Darker, more solid, elevated above other content
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Blur Levels Specification
|
|
126
|
+
|
|
127
|
+
### Blur Scale
|
|
128
|
+
|
|
129
|
+
| Level | Blur Amount | Use Case | Performance Impact |
|
|
130
|
+
|-------|-------------|----------|-------------------|
|
|
131
|
+
| **None** | `0px` | Disabled glass (fallback) | ✅ None |
|
|
132
|
+
| **Subtle** | `2px` | Micro-interactions | ✅ Low |
|
|
133
|
+
| **Light** | `5px` | Form inputs, buttons | ✅ Low |
|
|
134
|
+
| **Medium** | `10px` | Secondary cards, hover | ⚠️ Medium |
|
|
135
|
+
| **Standard** | `15px` | Primary cards (default) | ⚠️ Medium |
|
|
136
|
+
| **Heavy** | `20px` | Modals, elevated elements | ❌ High |
|
|
137
|
+
| **Extreme** | `30px` | Hero sections only | ❌ Very High |
|
|
138
|
+
|
|
139
|
+
**Performance Note**: Each `backdrop-filter` triggers a separate blur pass. Limit to 1-2 visible glass elements per viewport for optimal performance.
|
|
140
|
+
|
|
141
|
+
### Browser Support
|
|
142
|
+
|
|
143
|
+
```css
|
|
144
|
+
/* Always include both prefixes */
|
|
145
|
+
.glass {
|
|
146
|
+
backdrop-filter: blur(15px); /* Standard */
|
|
147
|
+
-webkit-backdrop-filter: blur(15px); /* Safari 9+ */
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Fallback for old browsers**:
|
|
152
|
+
```css
|
|
153
|
+
@supports not (backdrop-filter: blur(15px)) {
|
|
154
|
+
.glass {
|
|
155
|
+
background: rgba(20, 12, 40, 0.95); /* More opaque */
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Browser support**:
|
|
161
|
+
- ✅ Chrome 76+ (2019)
|
|
162
|
+
- ✅ Safari 9+ (2015)
|
|
163
|
+
- ✅ Firefox 103+ (2022)
|
|
164
|
+
- ✅ Edge 79+ (2020)
|
|
165
|
+
- ❌ IE 11 (use fallback)
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Opacity Scale
|
|
170
|
+
|
|
171
|
+
### Background Opacity
|
|
172
|
+
|
|
173
|
+
| Opacity | Value | Use Case | Visual Effect |
|
|
174
|
+
|---------|-------|----------|---------------|
|
|
175
|
+
| **Very Light** | `0.3` | Overlays, tooltips | Very transparent |
|
|
176
|
+
| **Light** | `0.5` | Hover states, nested cards | Transparent |
|
|
177
|
+
| **Medium** | `0.6` | Form inputs, buttons | Balanced |
|
|
178
|
+
| **Standard** | `0.7` | Main cards (default) | Readable |
|
|
179
|
+
| **Heavy** | `0.8` | Modals, elevated elements | Mostly opaque |
|
|
180
|
+
| **Very Heavy** | `0.9` | Navigation bars | Almost solid |
|
|
181
|
+
|
|
182
|
+
**Formula**:
|
|
183
|
+
```
|
|
184
|
+
Opacity = 0.5 + (depth_level * 0.1)
|
|
185
|
+
|
|
186
|
+
- Light: 0.5 (50%)
|
|
187
|
+
- Standard: 0.7 (70%)
|
|
188
|
+
- Darker: 0.8 (80%)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Shadow System (Pink-Tinted)
|
|
194
|
+
|
|
195
|
+
All shadows use **pink-tinted glow** for brand consistency.
|
|
196
|
+
|
|
197
|
+
### Shadow Scale
|
|
198
|
+
|
|
199
|
+
```css
|
|
200
|
+
/* Small shadow - Buttons, inputs */
|
|
201
|
+
box-shadow: 0 2px 8px rgba(217, 79, 144, 0.15);
|
|
202
|
+
|
|
203
|
+
/* Medium shadow - Cards (default) */
|
|
204
|
+
box-shadow: 0 4px 16px rgba(217, 79, 144, 0.25);
|
|
205
|
+
|
|
206
|
+
/* Large shadow - Elevated cards */
|
|
207
|
+
box-shadow: 0 8px 32px rgba(217, 79, 144, 0.35);
|
|
208
|
+
|
|
209
|
+
/* Extra large shadow - Modals */
|
|
210
|
+
box-shadow: 0 16px 64px rgba(217, 79, 144, 0.45);
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Shadow anatomy**:
|
|
214
|
+
- **X offset**: Always `0` (centered)
|
|
215
|
+
- **Y offset**: Increases with depth (2px → 4px → 8px → 16px)
|
|
216
|
+
- **Blur radius**: 4× the Y offset (8px → 16px → 32px → 64px)
|
|
217
|
+
- **Color**: Pink (`#d94f90`) with opacity (0.15 → 0.25 → 0.35 → 0.45)
|
|
218
|
+
|
|
219
|
+
### Glow Effect (Interactive)
|
|
220
|
+
|
|
221
|
+
On hover, add **additional glow** to shadows:
|
|
222
|
+
|
|
223
|
+
```css
|
|
224
|
+
.glass-card {
|
|
225
|
+
box-shadow: 0 4px 16px rgba(217, 79, 144, 0.25);
|
|
226
|
+
transition: box-shadow 0.3s ease;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.glass-card:hover {
|
|
230
|
+
box-shadow:
|
|
231
|
+
0 4px 16px rgba(217, 79, 144, 0.25), /* Original shadow */
|
|
232
|
+
0 0 20px rgba(217, 79, 144, 0.4); /* Additional glow */
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Glow properties**:
|
|
237
|
+
- **X/Y offset**: `0 0` (radiates from center)
|
|
238
|
+
- **Blur radius**: 20px (soft glow)
|
|
239
|
+
- **Opacity**: 40% (0.4) - brighter than base shadow
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Border Integration
|
|
244
|
+
|
|
245
|
+
### Border Opacity Scale
|
|
246
|
+
|
|
247
|
+
Borders always use **pink accent color** (`#d94f90`) with varying opacity:
|
|
248
|
+
|
|
249
|
+
| State | Opacity | Border Color | Use Case |
|
|
250
|
+
|-------|---------|--------------|----------|
|
|
251
|
+
| **Default** | 30% (0.3) | `rgba(217, 79, 144, 0.3)` | Resting state |
|
|
252
|
+
| **Hover** | 50% (0.5) | `rgba(217, 79, 144, 0.5)` | Mouse over |
|
|
253
|
+
| **Focus** | 70% (0.7) | `rgba(217, 79, 144, 0.7)` | Keyboard focus |
|
|
254
|
+
| **Active** | 90% (0.9) | `rgba(217, 79, 144, 0.9)` | Pressed/selected |
|
|
255
|
+
|
|
256
|
+
**Width**: Always `1px` (except focus outline which is `2px`)
|
|
257
|
+
|
|
258
|
+
### Border Radius
|
|
259
|
+
|
|
260
|
+
```css
|
|
261
|
+
/* Small - Buttons, badges */
|
|
262
|
+
border-radius: 4px;
|
|
263
|
+
|
|
264
|
+
/* Medium - Cards, inputs (default) */
|
|
265
|
+
border-radius: 8px;
|
|
266
|
+
|
|
267
|
+
/* Large - Modals, panels */
|
|
268
|
+
border-radius: 12px;
|
|
269
|
+
|
|
270
|
+
/* Extra large - Hero sections */
|
|
271
|
+
border-radius: 16px;
|
|
272
|
+
|
|
273
|
+
/* Pills - Fully rounded */
|
|
274
|
+
border-radius: 9999px;
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Performance Optimization
|
|
280
|
+
|
|
281
|
+
### Best Practices
|
|
282
|
+
|
|
283
|
+
✅ **DO**:
|
|
284
|
+
- Limit to 1-2 glass elements per viewport
|
|
285
|
+
- Use `will-change: transform` for animated glass
|
|
286
|
+
- Test on mid-range devices (not just high-end)
|
|
287
|
+
- Provide non-blur fallback for older browsers
|
|
288
|
+
|
|
289
|
+
❌ **DON'T**:
|
|
290
|
+
- Nest glass effects 3+ levels deep
|
|
291
|
+
- Animate `backdrop-filter` value (expensive)
|
|
292
|
+
- Use on entire page backgrounds
|
|
293
|
+
- Combine with heavy transforms/animations
|
|
294
|
+
|
|
295
|
+
### Optimization Techniques
|
|
296
|
+
|
|
297
|
+
**1. Reduce blur for animations**:
|
|
298
|
+
```css
|
|
299
|
+
.glass-card {
|
|
300
|
+
backdrop-filter: blur(15px);
|
|
301
|
+
transition: transform 0.3s ease; /* Transform is cheap */
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* DON'T animate blur */
|
|
305
|
+
.glass-card:hover {
|
|
306
|
+
backdrop-filter: blur(20px); /* ❌ Expensive re-calculation */
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* DO animate transform instead */
|
|
310
|
+
.glass-card:hover {
|
|
311
|
+
transform: translateY(-2px); /* ✅ GPU-accelerated */
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**2. Use `will-change` for known animations**:
|
|
316
|
+
```css
|
|
317
|
+
.glass-card-animated {
|
|
318
|
+
backdrop-filter: blur(15px);
|
|
319
|
+
will-change: transform; /* Hint to browser */
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**3. Debounce scroll effects**:
|
|
324
|
+
```javascript
|
|
325
|
+
// Bad: Update glass on every scroll frame
|
|
326
|
+
window.addEventListener('scroll', () => {
|
|
327
|
+
updateGlassEffect(); // ❌ 60fps × expensive blur = lag
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// Good: Throttle updates
|
|
331
|
+
let ticking = false;
|
|
332
|
+
window.addEventListener('scroll', () => {
|
|
333
|
+
if (!ticking) {
|
|
334
|
+
window.requestAnimationFrame(() => {
|
|
335
|
+
updateGlassEffect(); // ✅ Once per frame
|
|
336
|
+
ticking = false;
|
|
337
|
+
});
|
|
338
|
+
ticking = true;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## CLI Equivalent (Block Characters)
|
|
346
|
+
|
|
347
|
+
Since terminals don't support `backdrop-filter`, the CLI achieves glassmorphism through **block characters and color gradients**.
|
|
348
|
+
|
|
349
|
+
### Block Character Scale
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
█ - Solid (filled)
|
|
353
|
+
▓ - Dark (75% fill)
|
|
354
|
+
▒ - Medium (50% fill)
|
|
355
|
+
░ - Light (25% fill)
|
|
356
|
+
- Empty (transparent)
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Dashboard Border Pattern
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
▓▒░ ═══════════════════════════════════════ ░▒▓
|
|
363
|
+
👁️ US使AGE ANア統LYTICS 👁️
|
|
364
|
+
⟨ tōkei dēta wo... fuhai sasete iru... ⟩
|
|
365
|
+
▓▒░ ═══════════════════════════════════════ ░▒▓
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**Explanation**:
|
|
369
|
+
- `▓▒░` - Gradient from dark to light (simulates glass edge fade)
|
|
370
|
+
- `═` - Double line border (simulates border)
|
|
371
|
+
- Content area uses ANSI colors for pink accent
|
|
372
|
+
|
|
373
|
+
### Progress Bar Glassmorphism
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
████████▓▒░░░░░░░░░░ 40%
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
- `█` - Filled (solid pink foreground)
|
|
380
|
+
- `▓` - Transition zone (gradient)
|
|
381
|
+
- `▒` - Partial fill
|
|
382
|
+
- `░` - Empty (gray background)
|
|
383
|
+
|
|
384
|
+
**Implementation**:
|
|
385
|
+
```go
|
|
386
|
+
func renderProgressBar(filled, total, width int) string {
|
|
387
|
+
filledWidth := (filled * width) / total
|
|
388
|
+
|
|
389
|
+
bar := ""
|
|
390
|
+
for i := 0; i < width; i++ {
|
|
391
|
+
if i < filledWidth - 2 {
|
|
392
|
+
bar += "█" // Solid
|
|
393
|
+
} else if i < filledWidth {
|
|
394
|
+
bar += "▓" // Transition
|
|
395
|
+
} else if i < filledWidth + 1 {
|
|
396
|
+
bar += "▒" // Edge
|
|
397
|
+
} else {
|
|
398
|
+
bar += "░" // Empty
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return bar
|
|
402
|
+
}
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Accessibility Considerations
|
|
408
|
+
|
|
409
|
+
### WCAG Compliance
|
|
410
|
+
|
|
411
|
+
**Text on glass surfaces must meet WCAG AA (4.5:1 contrast)**:
|
|
412
|
+
|
|
413
|
+
✅ **Good** (passes):
|
|
414
|
+
```css
|
|
415
|
+
.glass-card {
|
|
416
|
+
background: rgba(20, 12, 40, 0.7); /* Dark enough */
|
|
417
|
+
color: #ffffff; /* White text */
|
|
418
|
+
}
|
|
419
|
+
/* Contrast: 21:1 on dark background behind glass ✓ */
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
❌ **Bad** (fails):
|
|
423
|
+
```css
|
|
424
|
+
.glass-card {
|
|
425
|
+
background: rgba(255, 255, 255, 0.3); /* Too light */
|
|
426
|
+
color: #888888; /* Gray text */
|
|
427
|
+
}
|
|
428
|
+
/* Contrast: Variable, often <4.5:1 ✗ */
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**Testing**: Always test with actual content behind glass (images, gradients, etc.)
|
|
432
|
+
|
|
433
|
+
### Reduced Motion
|
|
434
|
+
|
|
435
|
+
Respect `prefers-reduced-motion`:
|
|
436
|
+
|
|
437
|
+
```css
|
|
438
|
+
@media (prefers-reduced-motion: reduce) {
|
|
439
|
+
.glass-card {
|
|
440
|
+
backdrop-filter: none; /* Disable blur */
|
|
441
|
+
background: rgba(20, 12, 40, 0.95); /* More opaque */
|
|
442
|
+
transition: none; /* No animation */
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**Why**: Blur animations can cause vestibular issues for some users.
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Common Patterns
|
|
452
|
+
|
|
453
|
+
### Pattern 1: Card Hover Effect
|
|
454
|
+
|
|
455
|
+
```css
|
|
456
|
+
.glass-card {
|
|
457
|
+
background: rgba(20, 12, 40, 0.7);
|
|
458
|
+
backdrop-filter: blur(15px);
|
|
459
|
+
border: 1px solid rgba(217, 79, 144, 0.3);
|
|
460
|
+
box-shadow: 0 4px 16px rgba(217, 79, 144, 0.25);
|
|
461
|
+
transition: all 0.3s ease;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.glass-card:hover {
|
|
465
|
+
background: rgba(28, 18, 48, 0.5); /* Lighter */
|
|
466
|
+
border-color: rgba(217, 79, 144, 0.5); /* Brighter */
|
|
467
|
+
box-shadow:
|
|
468
|
+
0 4px 16px rgba(217, 79, 144, 0.25),
|
|
469
|
+
0 0 20px rgba(217, 79, 144, 0.4); /* Add glow */
|
|
470
|
+
transform: translateY(-2px); /* Subtle lift */
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
### Pattern 2: Button Glass Effect
|
|
477
|
+
|
|
478
|
+
```css
|
|
479
|
+
.glass-button {
|
|
480
|
+
background: rgba(217, 79, 144, 0.1);
|
|
481
|
+
backdrop-filter: blur(5px);
|
|
482
|
+
border: 1px solid rgba(217, 79, 144, 0.3);
|
|
483
|
+
color: var(--color-accent-primary);
|
|
484
|
+
padding: 0.5rem 1.5rem;
|
|
485
|
+
transition: all 0.3s ease;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.glass-button:hover {
|
|
489
|
+
background: rgba(217, 79, 144, 0.2);
|
|
490
|
+
border-color: rgba(217, 79, 144, 0.5);
|
|
491
|
+
box-shadow: 0 0 20px rgba(217, 79, 144, 0.4);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.glass-button:active {
|
|
495
|
+
background: rgba(182, 27, 112, 0.3); /* Darker pink */
|
|
496
|
+
transform: scale(0.98);
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
### Pattern 3: Input with Glass
|
|
503
|
+
|
|
504
|
+
```css
|
|
505
|
+
.glass-input {
|
|
506
|
+
background: rgba(20, 12, 40, 0.6);
|
|
507
|
+
backdrop-filter: blur(5px);
|
|
508
|
+
border: 1px solid rgba(217, 79, 144, 0.3);
|
|
509
|
+
color: white;
|
|
510
|
+
padding: 0.5rem 1rem;
|
|
511
|
+
transition: all 0.3s ease;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.glass-input:focus {
|
|
515
|
+
background: rgba(20, 12, 40, 0.8); /* More opaque */
|
|
516
|
+
border-color: rgba(217, 79, 144, 0.7); /* Brighter */
|
|
517
|
+
outline: 2px solid rgba(217, 79, 144, 0.5);
|
|
518
|
+
outline-offset: 2px;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.glass-input::placeholder {
|
|
522
|
+
color: rgba(255, 255, 255, 0.5);
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
### Pattern 4: Modal Overlay
|
|
529
|
+
|
|
530
|
+
```css
|
|
531
|
+
/* Semi-transparent backdrop */
|
|
532
|
+
.modal-overlay {
|
|
533
|
+
background: rgba(0, 0, 0, 0.8);
|
|
534
|
+
backdrop-filter: blur(10px);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* Elevated glass modal */
|
|
538
|
+
.modal-content {
|
|
539
|
+
background: rgba(12, 8, 28, 0.9);
|
|
540
|
+
backdrop-filter: blur(20px);
|
|
541
|
+
border: 1px solid rgba(217, 79, 144, 0.7);
|
|
542
|
+
box-shadow: 0 16px 64px rgba(217, 79, 144, 0.45);
|
|
543
|
+
border-radius: 16px;
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Design Token Reference
|
|
550
|
+
|
|
551
|
+
From `DESIGN_TOKENS.md`:
|
|
552
|
+
|
|
553
|
+
```json
|
|
554
|
+
{
|
|
555
|
+
"color": {
|
|
556
|
+
"surface": {
|
|
557
|
+
"glass": {
|
|
558
|
+
"default": {
|
|
559
|
+
"$value": "rgba(20, 12, 40, 0.7)",
|
|
560
|
+
"$description": "Standard glassmorphism background"
|
|
561
|
+
},
|
|
562
|
+
"light": {
|
|
563
|
+
"$value": "rgba(28, 18, 48, 0.5)",
|
|
564
|
+
"$description": "Light glass for hover/nested"
|
|
565
|
+
},
|
|
566
|
+
"darker": {
|
|
567
|
+
"$value": "rgba(12, 8, 28, 0.8)",
|
|
568
|
+
"$description": "Dark glass for modals"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"blur": {
|
|
574
|
+
"sm": { "$value": "2px" },
|
|
575
|
+
"md": { "$value": "5px" },
|
|
576
|
+
"lg": { "$value": "10px" },
|
|
577
|
+
"xl": { "$value": "15px" },
|
|
578
|
+
"2xl": { "$value": "20px" }
|
|
579
|
+
},
|
|
580
|
+
"shadow": {
|
|
581
|
+
"glass": {
|
|
582
|
+
"sm": { "$value": "0 2px 8px rgba(217, 79, 144, 0.15)" },
|
|
583
|
+
"md": { "$value": "0 4px 16px rgba(217, 79, 144, 0.25)" },
|
|
584
|
+
"lg": { "$value": "0 8px 32px rgba(217, 79, 144, 0.35)" },
|
|
585
|
+
"xl": { "$value": "0 16px 64px rgba(217, 79, 144, 0.45)" }
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## Related Documents
|
|
594
|
+
|
|
595
|
+
- **COLOR_SYSTEM.md** - Pink accent color specifications
|
|
596
|
+
- **COMPONENT_LIBRARY.md** - Glass component usage
|
|
597
|
+
- **INTERACTIVE_STATES.md** - Hover, focus, active states
|
|
598
|
+
- **ANIMATION_GUIDELINES.md** - Transition timing for glass effects
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
**Status**: ✅ **GLASSMORPHISM COMPLETE** - Ready for implementation
|