ima2-gen 2.0.15 → 2.0.16
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/README.md +30 -0
- package/bin/commands/skill.js +336 -17
- package/bin/ima2.js +22 -2
- package/bin/lib/doctor-checks.js +6 -4
- package/config.js +1 -0
- package/docs/CLI.md +25 -3
- package/docs/PROMPT_STUDIO.ko.md +29 -0
- package/docs/PROMPT_STUDIO.md +31 -0
- package/docs/migration/runtime-test-inventory.md +7 -1
- package/lib/agentImageVideoGen.js +8 -0
- package/lib/agentQueueStore.js +36 -10
- package/lib/agentQueueWorker.js +79 -7
- package/lib/agentRuntime.js +2 -0
- package/lib/assetLifecycle.js +40 -8
- package/lib/canvasVersionStore.js +86 -0
- package/lib/cardNewsGenerator.js +37 -3
- package/lib/cardNewsJobStore.js +10 -0
- package/lib/cardNewsManifestStore.js +6 -12
- package/lib/cardNewsPath.js +25 -0
- package/lib/db.js +2 -0
- package/lib/generatePipeline.js +474 -0
- package/lib/generationInputValidation.js +32 -0
- package/lib/grokImageCore.js +18 -1
- package/lib/historyIndex.js +11 -4
- package/lib/historyList.js +3 -0
- package/lib/imageMetadata.js +3 -0
- package/lib/inflight.js +30 -3
- package/lib/multimodePipeline.js +462 -0
- package/lib/nodeGeneration.js +440 -0
- package/lib/nodeValidation.js +23 -0
- package/lib/oauthProxy/generators.js +3 -246
- package/lib/oauthProxy/multimodeGenerators.js +251 -0
- package/lib/routeHelpers.js +9 -2
- package/package.json +2 -2
- package/routes/agent.js +4 -4
- package/routes/canvasVersions.js +21 -1
- package/routes/cardNews.js +2 -1
- package/routes/edit.js +25 -9
- package/routes/events.js +5 -1
- package/routes/generate.js +2 -481
- package/routes/keys.js +31 -39
- package/routes/multimode.js +2 -502
- package/routes/nodes.js +3 -448
- package/routes/video.js +12 -3
- package/routes/videoExtended.js +19 -4
- package/server.js +53 -1
- package/skills/ima2/SKILL.md +204 -0
- package/skills/ima2-front/SKILL.md +611 -0
- package/skills/ima2-front/references/a11y-patterns.md +134 -0
- package/skills/ima2-front/references/aesthetics.md +327 -0
- package/skills/ima2-front/references/anti-slop.md +241 -0
- package/skills/ima2-front/references/asset-requirements.md +431 -0
- package/skills/ima2-front/references/brand-asset-sourcing.md +122 -0
- package/skills/ima2-front/references/color-system.md +132 -0
- package/skills/ima2-front/references/consistency-locks.md +20 -0
- package/skills/ima2-front/references/crud-ui.md +53 -0
- package/skills/ima2-front/references/dropdown-layer.md +110 -0
- package/skills/ima2-front/references/i18n-global.md +104 -0
- package/skills/ima2-front/references/iterative-design.md +90 -0
- package/skills/ima2-front/references/korea-2026.md +174 -0
- package/skills/ima2-front/references/layout-discipline.md +161 -0
- package/skills/ima2-front/references/liquid-glass.md +181 -0
- package/skills/ima2-front/references/logo-sections.md +194 -0
- package/skills/ima2-front/references/mobile-ux.md +144 -0
- package/skills/ima2-front/references/performance-budget.md +106 -0
- package/skills/ima2-front/references/preflight-full.md +58 -0
- package/skills/ima2-front/references/product-density.md +53 -0
- package/skills/ima2-front/references/prototype-variants.md +54 -0
- package/skills/ima2-front/references/reference-capture.md +120 -0
- package/skills/ima2-front/references/responsive-viewport.md +139 -0
- package/skills/ima2-front/references/seo-baseline.md +123 -0
- package/skills/ima2-front/references/soft-3d-asset-gates.md +70 -0
- package/skills/ima2-front/references/stacks/astro.md +204 -0
- package/skills/ima2-front/references/stacks/mobile-native.md +281 -0
- package/skills/ima2-front/references/stacks/nextjs.md +219 -0
- package/skills/ima2-front/references/stacks/react.md +264 -0
- package/skills/ima2-front/references/stacks/svelte.md +235 -0
- package/skills/ima2-front/references/stacks/vanilla.md +226 -0
- package/skills/ima2-front/references/theme-switching.md +82 -0
- package/skills/ima2-front/references/top-bar.md +126 -0
- package/skills/ima2-front/references/typography-wrapping.md +270 -0
- package/skills/ima2-front/references/ux-writing-ko.md +62 -0
- package/skills/ima2-front/references/visual-verification.md +102 -0
- package/skills/ima2-uiux/SKILL.md +477 -0
- package/skills/ima2-uiux/references/anti-slop-judgment.md +39 -0
- package/skills/ima2-uiux/references/color-system.md +80 -0
- package/skills/ima2-uiux/references/design-isms.md +194 -0
- package/skills/ima2-uiux/references/design-read-example.md +33 -0
- package/skills/ima2-uiux/references/design-system-bootstrap.md +133 -0
- package/skills/ima2-uiux/references/favicon-logo.md +355 -0
- package/skills/ima2-uiux/references/form-patterns.md +118 -0
- package/skills/ima2-uiux/references/intent-discovery-ladder.md +86 -0
- package/skills/ima2-uiux/references/korean-design-vocabulary.md +52 -0
- package/skills/ima2-uiux/references/layout-macrostructures.md +54 -0
- package/skills/ima2-uiux/references/logo-trust-sections.md +96 -0
- package/skills/ima2-uiux/references/mobile-native-ux.md +207 -0
- package/skills/ima2-uiux/references/product-personalities.md +118 -0
- package/skills/ima2-uiux/references/responsive-nav.md +66 -0
- package/skills/ima2-uiux/references/typography-line-breaks.md +193 -0
- package/skills/ima2-uiux/references/ux-preflight.md +65 -0
- package/skills/ima2-uiux/references/ux-states.md +197 -0
- package/skills/ima2-uiux/references/visual-hierarchy.md +115 -0
- package/ui/dist/.vite/manifest.json +13 -13
- package/ui/dist/assets/AgentWorkspace-CtYt4SF5.js +3 -0
- package/ui/dist/assets/{CardNewsWorkspace-Cdxn1ohU.js → CardNewsWorkspace-DN5cVqG5.js} +1 -1
- package/ui/dist/assets/GenerationRequestLogPanel-DnmUQdKR.js +1 -0
- package/ui/dist/assets/{NodeCanvas-C67sLboA.js → NodeCanvas-CxpfIBI0.js} +1 -1
- package/ui/dist/assets/PromptBuilderPanel-C2R3ObtR.js +2 -0
- package/ui/dist/assets/{PromptImportDialog-DeQXsEEv.js → PromptImportDialog-BIxz_yEx.js} +2 -2
- package/ui/dist/assets/PromptImportDiscoverySection-BQTlPMME.js +1 -0
- package/ui/dist/assets/PromptImportFolderSection-Ds_Th9O3.js +1 -0
- package/ui/dist/assets/{PromptLibraryPanel-Db3xEPM_.js → PromptLibraryPanel-Rs4l45pV.js} +2 -2
- package/ui/dist/assets/{SettingsWorkspace-BDk_1W-V.js → SettingsWorkspace-p1AZ6uT9.js} +1 -1
- package/ui/dist/assets/index-0-_vgFGs.js +4 -0
- package/ui/dist/assets/index-Dm3pFxV4.js +23 -0
- package/ui/dist/assets/index-J8yDF3Ch.css +1 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/AgentWorkspace-DAg_7zpY.js +0 -3
- package/ui/dist/assets/GenerationRequestLogPanel-C_qvEUi2.js +0 -1
- package/ui/dist/assets/PromptBuilderPanel-DjvVdAie.js +0 -2
- package/ui/dist/assets/PromptImportDiscoverySection-CrwyUKYI.js +0 -1
- package/ui/dist/assets/PromptImportFolderSection-CToGMqYE.js +0 -1
- package/ui/dist/assets/index-2oG6in1i.css +0 -1
- package/ui/dist/assets/index-CoxMOXAU.js +0 -23
- package/ui/dist/assets/index-p8egnGHk.js +0 -4
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
# Favicon & Product Logo — Design Judgment & Patterns
|
|
2
|
+
|
|
3
|
+
Design guidance for favicons, product logos, and brand identity elements in web applications. Covers decision-making and design rationale.
|
|
4
|
+
|
|
5
|
+
Read `ima2-front` references for CSS implementation details.
|
|
6
|
+
Read `logo-trust-sections.md` for partner/client logo bars (separate concern).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Favicon: The Modern Minimum Set
|
|
11
|
+
|
|
12
|
+
You need **5 image files + 1 manifest**. Everything else is legacy bloat.
|
|
13
|
+
|
|
14
|
+
| File | Size | Purpose |
|
|
15
|
+
|------|------|---------|
|
|
16
|
+
| `favicon.ico` | 32x32 | Legacy browser fallback |
|
|
17
|
+
| `icon.svg` | Scalable | Modern browsers, dark mode via CSS media query |
|
|
18
|
+
| `apple-touch-icon.png` | 180x180 | iOS home screen bookmark |
|
|
19
|
+
| `icon-192.png` | 192x192 | Android home screen, PWA minimum |
|
|
20
|
+
| `icon-512.png` | 512x512 | PWA splash screen, install prompt |
|
|
21
|
+
|
|
22
|
+
Plus `site.webmanifest` referencing the 192 and 512 PNGs.
|
|
23
|
+
|
|
24
|
+
**Skip list (2025+):** 96x96, 128x128, 64x64, 144x144, msapplication-TileImage. All obsolete.
|
|
25
|
+
|
|
26
|
+
### HTML Head Markup
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
|
30
|
+
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
|
31
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
32
|
+
<link rel="manifest" href="/site.webmanifest">
|
|
33
|
+
<meta name="theme-color" content="#4a90d9">
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Order matters: ICO first (fallback), then SVG (modern browsers pick this).
|
|
37
|
+
|
|
38
|
+
### Web Manifest
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"name": "App Name",
|
|
43
|
+
"short_name": "App",
|
|
44
|
+
"icons": [
|
|
45
|
+
{ "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
|
|
46
|
+
{ "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" },
|
|
47
|
+
{ "src": "/icon-mask.png", "type": "image/png", "sizes": "512x512", "purpose": "maskable" }
|
|
48
|
+
],
|
|
49
|
+
"theme_color": "#4a90d9",
|
|
50
|
+
"background_color": "#ffffff",
|
|
51
|
+
"display": "standalone"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Maskable Icon (Android Adaptive)
|
|
56
|
+
|
|
57
|
+
Android 13+ crops icons into adaptive shapes (circles, squircles). The safe zone is a centered circle with 40% radius of the canvas. In practice: **at least 10% padding on all sides**. Never reuse the standard 512 icon — create a dedicated maskable version. Preview at https://maskable.app.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## SVG Favicon Dark Mode
|
|
62
|
+
|
|
63
|
+
SVG favicons can embed `prefers-color-scheme` to adapt automatically:
|
|
64
|
+
|
|
65
|
+
```xml
|
|
66
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
67
|
+
<style>
|
|
68
|
+
.logo-fill { fill: #1a1a2e; }
|
|
69
|
+
@media (prefers-color-scheme: dark) {
|
|
70
|
+
.logo-fill { fill: #f0f0f0; }
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
73
|
+
<circle class="logo-fill" cx="64" cy="64" r="60" />
|
|
74
|
+
</svg>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Browser support:**
|
|
78
|
+
|
|
79
|
+
| Browser | SVG Favicon | Dark Mode in SVG |
|
|
80
|
+
|---------|-------------|------------------|
|
|
81
|
+
| Chrome 80+ | Yes | Yes |
|
|
82
|
+
| Firefox 41+ | Yes | Yes |
|
|
83
|
+
| Edge (Chromium) | Yes | Yes |
|
|
84
|
+
| Safari 15+ | Renders SVG | Does NOT apply embedded `@media` |
|
|
85
|
+
|
|
86
|
+
Safari caveat: always shows light-mode variant. For Safari dark-mode favicons, swap a PNG via JS `matchMedia`.
|
|
87
|
+
|
|
88
|
+
**Rules:**
|
|
89
|
+
- Always set `viewBox`. Browsers default to 16x16 without it.
|
|
90
|
+
- Keep SVG simple. Complex paths at 16px tab size become noise.
|
|
91
|
+
- Test at actual tab size, not at source resolution.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Deriving a Favicon from a Logo
|
|
96
|
+
|
|
97
|
+
| Rule | Rationale |
|
|
98
|
+
|------|-----------|
|
|
99
|
+
| Use the logomark, not the wordmark | Text is illegible at 16x16 |
|
|
100
|
+
| Strip to 1-2 elements | Detail vanishes at small sizes |
|
|
101
|
+
| Maximum 3 colors (2 is better) | Color distinction fails at low resolution |
|
|
102
|
+
| Push contrast hard | White mark on vivid background holds up better than subtle coloring |
|
|
103
|
+
| Test on dark tab backgrounds | Dark favicons vanish against dark browser chrome |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Generation Workflow
|
|
108
|
+
|
|
109
|
+
1. Design the icon at 512x512 or as SVG in Figma/Illustrator
|
|
110
|
+
2. Create the SVG version manually (for dark mode — generators can't produce this)
|
|
111
|
+
3. Run through RealFaviconGenerator for all PNG/ICO sizes
|
|
112
|
+
4. Create a separate maskable version with safe-zone padding
|
|
113
|
+
5. Validate with RealFaviconGenerator's checker
|
|
114
|
+
|
|
115
|
+
**Framework-specific:**
|
|
116
|
+
- **Next.js App Router:** Drop `favicon.ico`, `icon.svg`, `apple-icon.png` into `app/`. Auto-generates `<link>` tags. For programmatic: export default from `app/icon.tsx` using `ImageResponse`.
|
|
117
|
+
- **Vite/React/Vue:** Place in `public/`. Reference with absolute paths in `index.html`.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Product Logo in Navigation
|
|
122
|
+
|
|
123
|
+
### Sizing
|
|
124
|
+
|
|
125
|
+
| Context | Height | Max Width |
|
|
126
|
+
|---------|--------|-----------|
|
|
127
|
+
| Desktop header | 40-48px | 280px |
|
|
128
|
+
| Mobile header | 32-40px | 160px |
|
|
129
|
+
| Retina/HiDPI | 2x PNG or SVG | Same |
|
|
130
|
+
|
|
131
|
+
Use fixed height + `width: auto` + `max-width` constraint. Set explicit `width` and `height` attributes on `<img>` to prevent CLS.
|
|
132
|
+
|
|
133
|
+
### Responsive Collapse
|
|
134
|
+
|
|
135
|
+
1. **Full logo** (mark + wordmark) above 1024px
|
|
136
|
+
2. **Logomark only** at 768-1024px
|
|
137
|
+
3. **Hamburger appears** below 768px, logomark stays
|
|
138
|
+
|
|
139
|
+
### Logo as Home Link
|
|
140
|
+
|
|
141
|
+
Universal UX convention. Implementation:
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
<a href="/" aria-label="Homepage">
|
|
145
|
+
<img src="/logo.svg" alt="Acme Corp" width="200" height="48">
|
|
146
|
+
</a>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Rules:
|
|
150
|
+
- Left-align (LTR). Always link to `/`.
|
|
151
|
+
- Use SVG for the logo image when possible.
|
|
152
|
+
- Click target: minimum 44x44px (WCAG 2.2 AAA). Pad with CSS if the logo is smaller.
|
|
153
|
+
- If the logo is the only content identifying the company, `alt` must name the org.
|
|
154
|
+
- If adjacent text already names the org, use `alt=""` (decorative).
|
|
155
|
+
|
|
156
|
+
### Inline SVG Logo
|
|
157
|
+
|
|
158
|
+
```html
|
|
159
|
+
<a href="/">
|
|
160
|
+
<svg role="img" aria-label="Acme Corp" viewBox="0 0 200 48">
|
|
161
|
+
<title>Acme Corp</title>
|
|
162
|
+
<!-- paths -->
|
|
163
|
+
</svg>
|
|
164
|
+
</a>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Dark Mode Logo
|
|
170
|
+
|
|
171
|
+
Four techniques, ranked by reliability:
|
|
172
|
+
|
|
173
|
+
### 1. Separate variants (most reliable)
|
|
174
|
+
|
|
175
|
+
```html
|
|
176
|
+
<picture>
|
|
177
|
+
<source srcset="/logo-dark.svg" media="(prefers-color-scheme: dark)">
|
|
178
|
+
<img src="/logo-light.svg" alt="Acme Corp" />
|
|
179
|
+
</picture>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 2. SVG embedded `prefers-color-scheme`
|
|
183
|
+
|
|
184
|
+
Works in `<img>`, CSS backgrounds, and favicons.
|
|
185
|
+
|
|
186
|
+
```xml
|
|
187
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 50">
|
|
188
|
+
<style>
|
|
189
|
+
.brand { fill: #1a1a2e; }
|
|
190
|
+
@media (prefers-color-scheme: dark) {
|
|
191
|
+
.brand { fill: #f5f5f5; }
|
|
192
|
+
}
|
|
193
|
+
</style>
|
|
194
|
+
<path class="brand" d="..." />
|
|
195
|
+
</svg>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 3. SVG `currentColor` (monochrome only)
|
|
199
|
+
|
|
200
|
+
```xml
|
|
201
|
+
<svg viewBox="0 0 100 100"><path fill="currentColor" d="..." /></svg>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Inherits parent's CSS `color`. Only works with inline SVGs, not `<img>` tags.
|
|
205
|
+
|
|
206
|
+
### 4. CSS `filter` (last resort)
|
|
207
|
+
|
|
208
|
+
```css
|
|
209
|
+
@media (prefers-color-scheme: dark) {
|
|
210
|
+
.logo img { filter: invert(1) hue-rotate(180deg); }
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Imprecise for multi-color logos. Use only for simple single-color marks.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Logo in Footer
|
|
219
|
+
|
|
220
|
+
- Height: **50-75% of header logo** (16-20px if header is 28px)
|
|
221
|
+
- Use a monochrome/neutral variant (grayscale or muted)
|
|
222
|
+
- Left-aligned or centered, near copyright line
|
|
223
|
+
- `loading="lazy"` if below the fold
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Open Graph & Social Sharing
|
|
228
|
+
|
|
229
|
+
### Required Images
|
|
230
|
+
|
|
231
|
+
| Platform | Size | Ratio |
|
|
232
|
+
|----------|------|-------|
|
|
233
|
+
| Facebook, LinkedIn, Slack, Discord | 1200x630px | 1.91:1 |
|
|
234
|
+
| X summary_large_image | 1200x630px | 1.91:1 |
|
|
235
|
+
| X summary card | 240x240px min | 1:1 |
|
|
236
|
+
|
|
237
|
+
Keep text/elements within the center 1080x600 safe zone.
|
|
238
|
+
|
|
239
|
+
### Meta Tags
|
|
240
|
+
|
|
241
|
+
```html
|
|
242
|
+
<meta property="og:image" content="https://example.com/og-image.png" />
|
|
243
|
+
<meta property="og:image:width" content="1200" />
|
|
244
|
+
<meta property="og:image:height" content="630" />
|
|
245
|
+
<meta property="og:image:alt" content="Acme Corp" />
|
|
246
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
247
|
+
<meta name="twitter:image" content="https://example.com/og-image.png" />
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Tags must be server-rendered. Social crawlers do not execute JavaScript.
|
|
251
|
+
|
|
252
|
+
### Schema.org Organization Logo
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"@context": "https://schema.org",
|
|
257
|
+
"@type": "Organization",
|
|
258
|
+
"name": "Acme Corp",
|
|
259
|
+
"url": "https://example.com",
|
|
260
|
+
"logo": { "@type": "ImageObject", "url": "https://example.com/logo.png", "width": 600, "height": 600 }
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Google requires at least 112x112px. Must be crawlable.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Brand Tokens from Logo
|
|
269
|
+
|
|
270
|
+
Extract the primary brand color from the logo and generate a full scale:
|
|
271
|
+
|
|
272
|
+
**Primitive tokens** (raw values):
|
|
273
|
+
```css
|
|
274
|
+
:root {
|
|
275
|
+
--color-brand-500: #1a73e8; /* logo primary color */
|
|
276
|
+
--color-brand-400: #4a90d9;
|
|
277
|
+
--color-brand-600: #1557b0;
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Semantic tokens** (usage-based):
|
|
282
|
+
```css
|
|
283
|
+
:root {
|
|
284
|
+
--color-brand-primary: var(--color-brand-500);
|
|
285
|
+
--color-brand-hover: var(--color-brand-600);
|
|
286
|
+
--color-brand-subtle: var(--color-brand-400);
|
|
287
|
+
--color-brand-on-primary: #ffffff;
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Generate the full 50-950 scale using OKLCH for perceptual evenness. Reference: `color-system.md`.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Empty State & Error Page Logos
|
|
296
|
+
|
|
297
|
+
| Context | Logo Treatment |
|
|
298
|
+
|---------|---------------|
|
|
299
|
+
| 404 / 500 error | Simplified mark, not prominent. Focus is on error message + recovery action. |
|
|
300
|
+
| Empty state (no data) | Contextual illustration preferred over logo. Brand presence via nav header. |
|
|
301
|
+
| First-run / onboarding | Full logo acceptable as part of welcome. |
|
|
302
|
+
| Maintenance page | Full logo + brand colors to reassure users. |
|
|
303
|
+
|
|
304
|
+
Never place a large isolated logo as the centerpiece of a 404 page — users read it as a dead end. Pair a small mark with clear next-step navigation.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Animated Logo
|
|
309
|
+
|
|
310
|
+
**When appropriate:** App launch/splash (under 3s), page transitions as loading indicator, marketing hero sections.
|
|
311
|
+
|
|
312
|
+
**When not:** Nav logo on every page load, on scroll, or as persistent decoration.
|
|
313
|
+
|
|
314
|
+
**Performance:**
|
|
315
|
+
- Prefer CSS animations (transform, opacity) — GPU-composited.
|
|
316
|
+
- Lottie for complex animations adds 50-250KB. Only justified for splash screens.
|
|
317
|
+
- Keep animated SVGs under 10KB.
|
|
318
|
+
|
|
319
|
+
**`prefers-reduced-motion` is mandatory (WCAG 2.1 AA):**
|
|
320
|
+
|
|
321
|
+
```css
|
|
322
|
+
.logo-animated { animation: logo-entrance 1.2s ease-out; }
|
|
323
|
+
@media (prefers-reduced-motion: reduce) {
|
|
324
|
+
.logo-animated { animation: none; }
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Common Mistakes
|
|
331
|
+
|
|
332
|
+
| Mistake | Why It Matters |
|
|
333
|
+
|---------|---------------|
|
|
334
|
+
| Blurry favicons | Scaling 512px to 16px with generic resampling. Generate each size natively or use SVG. |
|
|
335
|
+
| Missing apple-touch-icon | iOS shows ugly screenshot clip on home screen save. |
|
|
336
|
+
| Reusing standard icon as maskable | Android crops it — logo text gets clipped without safe-zone padding. |
|
|
337
|
+
| Not testing at actual tab size | 512px preview is meaningless. Test at 16px in real browser tabs. |
|
|
338
|
+
| Forgetting dark mode | Dark favicon vanishes against dark browser chrome. |
|
|
339
|
+
| Transparent apple-touch-icon | iOS replaces transparency with black. Always use solid background. |
|
|
340
|
+
| Missing `sizes` attribute | Browser picks wrong resolution file. |
|
|
341
|
+
| No explicit width/height on logo `<img>` | Causes CLS as image loads. |
|
|
342
|
+
| Over-complex favicon design | Detailed illustrations at 16px become noise. Simplify ruthlessly. |
|
|
343
|
+
| Stale cached favicons | Use `?v=2` query string during rollout, remove after propagation. |
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Performance
|
|
348
|
+
|
|
349
|
+
- **Cache aggressively:** `Cache-Control: public, immutable, max-age=31536000` for favicons (rarely change).
|
|
350
|
+
- **Minify SVG:** SVGO, strip editor metadata. Target under 1KB for favicon SVGs.
|
|
351
|
+
- **Compress PNG:** pngquant/oxipng. 32x32 should be under 2KB.
|
|
352
|
+
- **Don't serve from a different domain** (extra DNS lookup).
|
|
353
|
+
- **Don't use Base64 data URIs** for favicons (bloats HTML, defeats caching).
|
|
354
|
+
- **Preload primary favicon** if needed: `<link rel="preload" href="/icon.svg" as="image" type="image/svg+xml">` — but only the primary one.
|
|
355
|
+
- **`loading="lazy"`** on trust-bar logos below fold, NOT on header logo.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Form Design Patterns
|
|
2
|
+
|
|
3
|
+
Validation timing, multi-step wizards, auth forms, file upload, and search/filter.
|
|
4
|
+
|
|
5
|
+
## 1. Validation Timing
|
|
6
|
+
|
|
7
|
+
| Strategy | When | Use For |
|
|
8
|
+
|----------|------|---------|
|
|
9
|
+
| **On blur** (default) | User leaves the field | Most fields — email, name, phone |
|
|
10
|
+
| **On submit** | Form is submitted | Short forms (≤ 4 fields), payment |
|
|
11
|
+
| **Real-time** | As user types, debounced 300ms | Username availability, search |
|
|
12
|
+
| **On blur + on change after first error** | First error on blur, subsequent on keystroke | Long forms |
|
|
13
|
+
|
|
14
|
+
- Never show errors on empty fields before first interaction
|
|
15
|
+
- Error appears below the field, not in a top-level alert
|
|
16
|
+
- Error state: red border + error icon + message text (never color alone)
|
|
17
|
+
- Success state: green check on field, NOT green border (a11y)
|
|
18
|
+
- Clear error when user starts correcting
|
|
19
|
+
|
|
20
|
+
## Multi-Step Form (Wizard)
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Step Indicator (1/3, 2/3, 3/3)
|
|
24
|
+
├── Step Title
|
|
25
|
+
├── Fields for this step
|
|
26
|
+
├── [Back] [Next / Submit]
|
|
27
|
+
└── Progress bar (optional)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Step indicator always visible (horizontal bar or numbered pills)
|
|
31
|
+
- Back button preserves all entered data
|
|
32
|
+
- Validate current step before allowing Next
|
|
33
|
+
- Final step shows summary before Submit
|
|
34
|
+
- Save partial state to sessionStorage (refresh-safe)
|
|
35
|
+
- Mobile: full-width steps, no horizontal scroll for indicator
|
|
36
|
+
- Max 5 steps — break longer flows into separate forms
|
|
37
|
+
|
|
38
|
+
## Auth / Password Forms
|
|
39
|
+
|
|
40
|
+
### Sign In
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
[Email / Username]
|
|
44
|
+
[Password] [Show/Hide toggle]
|
|
45
|
+
[Forgot password?]
|
|
46
|
+
[Sign In]
|
|
47
|
+
[— or —]
|
|
48
|
+
[Social login buttons]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Sign Up
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
[Email]
|
|
55
|
+
[Password] [Strength meter below]
|
|
56
|
+
[Confirm password]
|
|
57
|
+
[Terms checkbox]
|
|
58
|
+
[Sign Up]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Show/hide toggle as icon button inside the password field
|
|
62
|
+
- Strength meter: visual bar (red → yellow → green) + text label
|
|
63
|
+
- Weak: < 8 chars or common password
|
|
64
|
+
- Medium: 8+ chars, mixed case
|
|
65
|
+
- Strong: 12+ chars, mixed case + number + symbol
|
|
66
|
+
- Never disable paste on password fields
|
|
67
|
+
- `autocomplete`: `username`, `current-password`, `new-password`
|
|
68
|
+
- Passkey/WebAuthn: offer as primary when supported
|
|
69
|
+
- Wrong credentials: "Invalid email or password" (never reveal which)
|
|
70
|
+
|
|
71
|
+
## File Upload
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
[Drop zone: dashed border, icon, "Drag files here or click"]
|
|
75
|
+
[File list: name, size, progress bar, remove]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- `accept` attribute: specify allowed types
|
|
79
|
+
- Max file size visible in drop zone text
|
|
80
|
+
- Individual progress bar per file
|
|
81
|
+
- Preview: thumbnails for images, icon + filename for documents
|
|
82
|
+
- Failed files: red highlight + retry button
|
|
83
|
+
- Multiple files: drag handles if order matters
|
|
84
|
+
- Drop zone is `<button>` or `role="button"`, keyboard-activatable
|
|
85
|
+
- Mobile: tap opens file picker, camera option for images
|
|
86
|
+
|
|
87
|
+
## Search / Filter
|
|
88
|
+
|
|
89
|
+
Filter dropdowns, sort menus, and search comboboxes use the project's unified
|
|
90
|
+
dropdown design layer (`ima2-front` `dropdown-layer.md`
|
|
91
|
+
FE-DROPDOWN-LAYER-01): one skin, behavior-correct primitive per pattern.
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
[Search input + icon]
|
|
95
|
+
[Filter pills / dropdown] [Active filter count]
|
|
96
|
+
[Results count: "42 results"]
|
|
97
|
+
[Clear all filters]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- Debounce search input 300ms before querying
|
|
101
|
+
- Empty: show suggestions or recent searches
|
|
102
|
+
- Filter state reflected in URL query params (shareable, back-button works)
|
|
103
|
+
- Loading: skeleton results, not blank screen
|
|
104
|
+
- No results: helpful message + suggest clearing filters
|
|
105
|
+
|
|
106
|
+
## Pre-flight
|
|
107
|
+
|
|
108
|
+
- [ ] Validation uses on-blur timing by default
|
|
109
|
+
- [ ] Error messages appear below the relevant field
|
|
110
|
+
- [ ] Password fields have show/hide toggle and `autocomplete`
|
|
111
|
+
- [ ] Multi-step forms preserve data on back/refresh
|
|
112
|
+
- [ ] File uploads show individual progress and support drag-and-drop
|
|
113
|
+
|
|
114
|
+
## Cross-references
|
|
115
|
+
|
|
116
|
+
- Mobile form rules: `dev-frontend/references/core/mobile-ux.md`
|
|
117
|
+
- Validation UX states: `ux-states.md` §9
|
|
118
|
+
- Schema validation: `dev-frontend/SKILL.md` §10 (Zod + react-hook-form)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Intent Discovery Ladder
|
|
2
|
+
|
|
3
|
+
Use this ladder only when UX-INTENT-01 step 2 fails (one fork was insufficient)
|
|
4
|
+
or the user explicitly wants guided exploration. The compact flow in SKILL.md §1
|
|
5
|
+
(Design Read → ONE clarifying fork → proceed) is the default; this ladder is the
|
|
6
|
+
optional deepening path.
|
|
7
|
+
|
|
8
|
+
Rules:
|
|
9
|
+
- Use binary/ternary choices, not open-ended questions.
|
|
10
|
+
- Reference known products — users recognize what they want faster than they articulate it.
|
|
11
|
+
- If the diagram skill is available, offer: "참고로 스타일 비교를 다이어그램으로 보여드릴 수도 있어요."
|
|
12
|
+
- If the user names a specific product reference, skip remaining steps and map
|
|
13
|
+
directly via `references/product-personalities.md`.
|
|
14
|
+
|
|
15
|
+
## Step 1 — Mood
|
|
16
|
+
|
|
17
|
+
Ask: "전체적인 분위기가 어떤 느낌이면 좋을까요?" / "What overall feeling should the product have?"
|
|
18
|
+
|
|
19
|
+
| Option | Signals | Product References |
|
|
20
|
+
|--------|---------|-------------------|
|
|
21
|
+
| 전문적/신뢰감 (Professional) | swiss, flat, restrained | Linear, Vercel, GitHub |
|
|
22
|
+
| 따뜻한/친근한 (Warm/Friendly) | rounded, warm-neutrals, illustrations | Notion, Airbnb, Toss |
|
|
23
|
+
| 고급스러운/세련된 (Premium) | generous-whitespace, thin-type, restrained-color | Apple, Stripe, Aesop |
|
|
24
|
+
| 재미있는/활기찬 (Fun/Energetic) | bright-colors, playful-shapes, bold-type | Figma, Discord |
|
|
25
|
+
| 대담한/독특한 (Bold/Distinctive) | brutalism, asymmetry, experimental | Gumroad, Nothing |
|
|
26
|
+
|
|
27
|
+
## Step 2 — Lightness
|
|
28
|
+
|
|
29
|
+
Ask: "밝은 화면이 좋으신가요, 어두운 화면이 좋으신가요?" / "Light or dark background?"
|
|
30
|
+
|
|
31
|
+
| Option | CSS |
|
|
32
|
+
|--------|-----|
|
|
33
|
+
| 밝은 배경 (Light) | `bg-white text-gray-900` |
|
|
34
|
+
| 어두운 배경 (Dark) | `bg-gray-950 text-gray-100` |
|
|
35
|
+
| 둘 다 (Both / auto) | `prefers-color-scheme` aware |
|
|
36
|
+
|
|
37
|
+
## Step 3 — Density
|
|
38
|
+
|
|
39
|
+
Ask: "화면에 정보가 많이 보이는 게 좋으신가요, 여유롭게 보이는 게 좋으신가요?" / "Dense or spacious?"
|
|
40
|
+
|
|
41
|
+
| Option | VISUAL_DENSITY | Tokens |
|
|
42
|
+
|--------|---------------|--------|
|
|
43
|
+
| 빽빽하게 (Dense) | 8-10 | `text-sm py-1 px-2 gap-1` |
|
|
44
|
+
| 보통 (Normal) | 4-7 | `text-base py-3 px-4 gap-4` |
|
|
45
|
+
| 여유롭게 (Spacious) | 1-3 | `text-lg py-8 px-8 gap-8` |
|
|
46
|
+
|
|
47
|
+
## Step 4 — Shape
|
|
48
|
+
|
|
49
|
+
Ask: "모서리가 각진 느낌이 좋으신가요, 둥근 느낌이 좋으신가요?" / "Sharp or rounded?"
|
|
50
|
+
|
|
51
|
+
| Option | CSS | Signals |
|
|
52
|
+
|--------|-----|---------|
|
|
53
|
+
| 각진 (Sharp) | `rounded-none` / 0-2px | Vercel, brutalism, swiss |
|
|
54
|
+
| 살짝 둥근 (Slightly rounded) | `rounded-md` / 6-8px | Linear, Notion, material |
|
|
55
|
+
| 많이 둥근 (Very rounded) | `rounded-2xl` / 16-24px | Figma, iOS, Toss |
|
|
56
|
+
|
|
57
|
+
## Step 5 — Viewport Priority
|
|
58
|
+
|
|
59
|
+
Ask: "주로 어떤 화면에서 볼 건가요?" / "What's the primary viewing device?"
|
|
60
|
+
|
|
61
|
+
| Option | Responsive Strategy | Key Constraint |
|
|
62
|
+
|--------|-------------------|----------------|
|
|
63
|
+
| 데스크탑 위주 (Desktop-first) | Desktop layout → tablet → mobile collapse | Data density OK, hover interactions OK |
|
|
64
|
+
| 모바일 위주 (Mobile-first) | Mobile layout → tablet → desktop expansion | Thumb zone, touch targets, minimal density |
|
|
65
|
+
| 둘 다 중요 (Both equally) | Design mobile AND desktop as separate compositions | Most work — section order/composition may differ |
|
|
66
|
+
|
|
67
|
+
Cross-ref: `references/responsive-nav.md` for canonical breakpoints, `dev-frontend/references/core/mobile-ux.md` for mobile rules.
|
|
68
|
+
|
|
69
|
+
## Step 6 — Reference
|
|
70
|
+
|
|
71
|
+
Ask: "혹시 '이런 느낌이면 좋겠다' 하는 사이트나 앱이 있으신가요?" / "Any website or app that feels like what you want?"
|
|
72
|
+
|
|
73
|
+
This single question often resolves all ambiguity. If the user names a product, map it via `references/product-personalities.md`.
|
|
74
|
+
|
|
75
|
+
## Vague Request Disambiguation
|
|
76
|
+
|
|
77
|
+
When the user gives feedback without specifics, translate:
|
|
78
|
+
|
|
79
|
+
| User says | Action |
|
|
80
|
+
|-----------|--------|
|
|
81
|
+
| "더 좋게" / "make it better" | Ask: "레이아웃? 색상? 타이포? 여백?" — identify the dimension |
|
|
82
|
+
| "더 전문적으로" / "more professional" | Increase whitespace, reduce color count to 2-3, tighten grid alignment |
|
|
83
|
+
| "더 모던하게" / "more modern" | Negative letter-spacing on headings, offer dark mode, reduce radius to 8px |
|
|
84
|
+
| "더 재미있게" / "more exciting" | Add one bold accent color, increase type contrast, add micro-animation on hover |
|
|
85
|
+
| "너무 심심해" / "too boring" | Add asymmetric layout, introduce one unexpected element, vary section rhythm |
|
|
86
|
+
| "너무 복잡해" / "too busy" | Reduce element count, increase whitespace, limit to 2 colors |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Korean Design Vocabulary
|
|
2
|
+
|
|
3
|
+
Map common Korean design descriptors to concrete tokens. When the user uses
|
|
4
|
+
these words, translate before implementing.
|
|
5
|
+
|
|
6
|
+
## Translation Table
|
|
7
|
+
|
|
8
|
+
| Korean | Literal | CSS/Token Translation |
|
|
9
|
+
|--------|---------|----------------------|
|
|
10
|
+
| 깔끔하게 | cleanly | Generous whitespace (24-48px gaps), strict grid, max 2-3 colors, saturation < 60%, 1px borders or none, 4-8px radius, single font, no/subtle shadows |
|
|
11
|
+
| 모던하게 | modern | Geometric sans-serif (Geist/Outfit), negative letter-spacing on headings, dark mode or high-contrast light, 8-16px radius, spring micro-interactions |
|
|
12
|
+
| 고급스럽게 | luxurious | Very generous whitespace (48-96px padding), thin weights (300-400), refined sans by default, serif only with editorial/luxury rationale, low-saturation palette, slow animations (800ms+), 0-4px radius |
|
|
13
|
+
| 심플하게 | simply | Max 3-4 element types per screen, 1-2 colors, single font, 2-3 size steps, hidden/minimal navigation, zero decoration |
|
|
14
|
+
| 트렌디하게 | trendy | Glassmorphism, bento grid, gradient mesh, variable fonts — ask for a reference site |
|
|
15
|
+
| 따뜻하게 | warmly | Warm hue range (stone/amber/orange), 12-20px radius, warm-tinted shadows rgba(180,140,100,0.1), rounded or humanist sans |
|
|
16
|
+
| 차가운 | cold/cool | Cool grays (slate/zinc), blue-tinted whites, geometric sans, thin weights, 0-8px radius |
|
|
17
|
+
| 감성적으로 | emotionally | Editorial/lifestyle, serif display + sans body, muted/pastel colors, generous line-height, photography-heavy |
|
|
18
|
+
|
|
19
|
+
## Clarifying Questions per Term
|
|
20
|
+
|
|
21
|
+
- 깔끔: "Notion처럼 따뜻한 깔끔함인지, Vercel처럼 차가운 깔끔함인지요?"
|
|
22
|
+
- 모던: "다크 모드 + 날카로움(Linear)인지, 화이트 + 미니멀(Vercel)인지요?"
|
|
23
|
+
- 고급: "브랜드 고급감(Apple/Stripe)인지, 패션 럭셔리(Art Deco)인지요?"
|
|
24
|
+
- 심플: "기능이 적은 건지, 기능은 많지만 화면이 심플해 보이길 원하는 건지요?"
|
|
25
|
+
|
|
26
|
+
## Quick-Match Table
|
|
27
|
+
|
|
28
|
+
Rapid lookup: user word → concrete starting point.
|
|
29
|
+
|
|
30
|
+
| User (KO) | User (EN) | Start From | Dark? | Radius | Density | Font |
|
|
31
|
+
|------------|-----------|------------|-------|--------|---------|------|
|
|
32
|
+
| 깔끔하게 | Clean | Notion or Vercel | No | 8px | 4-7 | Geist / Pretendard |
|
|
33
|
+
| 모던하게 | Modern | Linear or Vercel | Yes | 6px | 4-7 | Geist / Outfit |
|
|
34
|
+
| 고급스럽게 | Premium | Apple or Stripe | Either | 0-4px | 1-3 | Satoshi / system thin-300 |
|
|
35
|
+
| 심플하게 | Simple | Vercel | Either | 0px | 1-3 | Geist |
|
|
36
|
+
| 따뜻하게 | Warm | Notion or Toss | No | 12px | 4-7 | Pretendard / Cabinet Grotesk |
|
|
37
|
+
| 재미있게 | Fun | Figma | No | 16px+ | 4-7 | Custom grotesque |
|
|
38
|
+
| 전문적으로 | Professional | Linear or GitHub | Either | 6px | 4-7 | Geist / Outfit |
|
|
39
|
+
| 대담하게 | Bold | Neobrutalism | No | 0px | 4-7 | Black 900 |
|
|
40
|
+
| 감성적으로 | Aesthetic | Editorial | No | 0-4px | 1-3 | Serif display |
|
|
41
|
+
| 트렌디하게 | Trendy | Ask for reference | Either | 12px | 4-7 | Variable font |
|
|
42
|
+
|
|
43
|
+
## Font Selection Guidelines
|
|
44
|
+
|
|
45
|
+
- **Typography stance (UX-TYPE-01)**: sans by default. Use serif only when the brief, brand system, or stated editorial/premium rationale supports it; do not inject one serif word into an otherwise sans headline for spice. When serif is justified (AI-product/editorial/research/trust surfaces), use the three-role system — display serif at light weights 330-400 + sans UI + mono accent — never as a bare AI-premium shortcut ("tasteslop"); gates in `ima2-front` `aesthetics.md`.
|
|
46
|
+
- **Primary default**: Geist (modern SaaS, Vercel ecosystem)
|
|
47
|
+
- **Korean-first**: Pretendard. Close alternatives: SUIT, Wanted Sans, LINE Seed KR, Noto Sans KR, Spoqa Han Sans Neo, Source Han Sans KR.
|
|
48
|
+
- **Light centered Korean hero**: 300-400 weight is display-only (>= ~40px) for FE-HERO-LIGHT-CENTER-01.
|
|
49
|
+
- **Warm/editorial**: Outfit or Cabinet Grotesk
|
|
50
|
+
- **Premium/luxury**: Satoshi or system thin weights
|
|
51
|
+
- **Korean serif display**: MaruBuri (Naver) 400-600 for editorial Hangul headlines, paired with Pretendard UI.
|
|
52
|
+
- **Avoid defaulting to Inter** (DEFAULT) — #1 AI-generated UI tell.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
## 1. Layout Composition Patterns
|
|
2
|
+
|
|
3
|
+
Select the layout that matches the product surface. Provide the CSS grid template.
|
|
4
|
+
|
|
5
|
+
### Sidebar + Content (Dashboard default)
|
|
6
|
+
```css
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: 256px 1fr; /* 64px when collapsed */
|
|
9
|
+
grid-template-rows: auto 1fr;
|
|
10
|
+
```
|
|
11
|
+
**Use:** Dashboards, admin panels, docs. **Mobile collapse:** Sidebar becomes hamburger overlay or bottom nav.
|
|
12
|
+
|
|
13
|
+
### Holy Grail (Three-column)
|
|
14
|
+
```css
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: 200px 1fr 200px;
|
|
17
|
+
grid-template-areas: "header header header" "left main right" "footer footer footer";
|
|
18
|
+
```
|
|
19
|
+
**Use:** Traditional websites with left/right sidebars. **Mobile collapse:** Stack vertically, hide sidebars behind toggles.
|
|
20
|
+
|
|
21
|
+
### Responsive Card Grid
|
|
22
|
+
```css
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
25
|
+
gap: 24px;
|
|
26
|
+
```
|
|
27
|
+
**Use:** Product listings, galleries, feature grids. **Mobile collapse:** Automatic — 1 col mobile, 2 tablet, 3+ desktop. Zero media queries.
|
|
28
|
+
|
|
29
|
+
### Dashboard (Sidebar + Metrics + Content)
|
|
30
|
+
```css
|
|
31
|
+
.shell { display: grid; grid-template-columns: 256px 1fr; }
|
|
32
|
+
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
|
|
33
|
+
.content { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
|
|
34
|
+
```
|
|
35
|
+
**Metric cards:** Primary number 28-32px, comparison 14px, ONE visual element per card (sparkline OR trend arrow, not both).
|
|
36
|
+
|
|
37
|
+
### Bento Grid
|
|
38
|
+
```css
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: repeat(4, 1fr);
|
|
41
|
+
grid-auto-rows: minmax(180px, auto);
|
|
42
|
+
gap: 16px;
|
|
43
|
+
/* Feature items span 2 cols or 2 rows */
|
|
44
|
+
```
|
|
45
|
+
**Use:** Feature showcases, portfolio, marketing sections. **Mobile collapse:** Stack to single column, feature items full-width.
|
|
46
|
+
|
|
47
|
+
### Master-Detail
|
|
48
|
+
```css
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: 320px 1fr;
|
|
51
|
+
```
|
|
52
|
+
**Use:** Email, chat, file managers, list-with-preview. **Mobile collapse:** List view only, tap opens detail full-screen.
|
|
53
|
+
|
|
54
|
+
---
|