You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Consumer-facing agent guide |`packages/superdoc/AGENTS.md` (ships with npm package) |
70
74
71
75
## Style Resolution Boundary
72
76
@@ -193,12 +197,15 @@ Pixel-level before/after comparison for documents that failed layout comparison.
193
197
194
198
## Brand & Design System
195
199
196
-
Brand guidelines, voice, and design tokens live in `brand/`. Token values are defined in `packages/superdoc/src/assets/styles/tokens.css`.
200
+
Brand guidelines, voice, and design tokens live in `brand/`.
201
+
Token contract source is `packages/superdoc/src/assets/styles/helpers/variables.css` (`:root` defaults).
202
+
Preset theme overrides are defined in `packages/superdoc/src/assets/styles/helpers/themes.css`.
197
203
198
204
**When creating or modifying UI components:**
199
-
- Use `--sd-*` CSS custom properties — never hardcode hex values. See `tokens.css` for all available variables.
200
-
- Tokens follow three tiers: primitive (`--sd-color-blue-500`) → semantic (`--sd-action-primary`) → component (`--sd-comment-bg`). Components reference semantic or component-level variables.
201
-
- Expose component-specific variables as `--sd-{component}-*` so consumers can customize via CSS.
202
-
- Document component CSS variables in `apps/docs/ui-components/` (Mintlify docs).
205
+
- Use `--sd-*` CSS custom properties — never hardcode hex values.
206
+
- Treat `variables.css` as the canonical token contract; add new tokens there.
207
+
- Keep preset themes in `themes.css` (`.sd-theme-*`) and override only the tokens that need theme-specific values.
208
+
- Tokens are organized by layers: primitive (`--sd-color-blue-500`) → UI/document tokens (`--sd-ui-*`, `--sd-comments-*`, etc.) → component usage.
209
+
- Expose UI component-specific variables as `--sd-ui-{component}-*` so consumers can customize via CSS.
203
210
204
211
**When writing copy or content:** see `brand/brand-guidelines.md` for voice, tone, and the dual-register pattern (developer vs. leader). Product name is always **SuperDoc** (capital S, capital D).
0 commit comments