@stnd/styles 0.5.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/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # @stnd/styles
2
+
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Folio Load order
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Folio order
14
+
15
+ ## 0.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 2d0ae02: NPM Test
20
+
21
+ ## 0.2.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 6d8888a: First release
package/README.md ADDED
@@ -0,0 +1,116 @@
1
+ ---
2
+ title: "@stnd/styles"
3
+ status: active
4
+ maturity: tree
5
+ type: package
6
+ tags:
7
+ - package
8
+ - stnd
9
+ ---
10
+
11
+ # @stnd/styles
12
+
13
+ The CSS typography and design system framework for the Standard Ecosystem.
14
+
15
+ ## Overview
16
+
17
+ `@stnd/styles` is a comprehensive design system based on classical book design, the Golden Ratio, and OKLCH color spaces. It provides structural layout grids, clean typography scales, and automated color themes for all Standard applications with zero configuration.
18
+
19
+ ---
20
+
21
+ ## 1. Mathematical Spacing & Ratios
22
+
23
+ The system rejects arbitrary pixel coordinates. All spacing, font scaling, and line heights are tied to three mathematical constants:
24
+
25
+ * **Golden Ratio** ($\phi \approx 1.618$): Governs structural widths, block margins, and main layout columns.
26
+ * **Silver Ratio** ($\theta \approx 1.414$): Governs the typographic scale and base vertical rhythm.
27
+ * **Halfstep** ($\sqrt{\phi} \approx 1.272$): Square root of the Golden Ratio, used for subheadings, margins, and inline gaps.
28
+
29
+ ---
30
+
31
+ ## 2. Typographic Scale
32
+
33
+ Standard applies a strict modular font scale to prevent typographic clashes. Body font sizes map to CSS custom properties:
34
+
35
+ | CSS Variable | Scale Class | Value / Application |
36
+ | :--- | :--- | :--- |
37
+ | `--scale-8` | `.scale-8` | Large Display Title |
38
+ | `--scale-4` | `h1` | Primary Document Header |
39
+ | `--scale-2` | `h2` | Subheadings |
40
+ | `--scale` | `body` | **Base Body Text ($1\text{rem}$)** |
41
+ | `--scale-d2` | `.small`, `small` | Captions, Side Notes |
42
+ | `--scale-d3` | `.smaller` | Footnotes |
43
+ | `--scale-d4` | `.micro` | Meta Labels, Short Codes |
44
+ | `--scale-d5` | `.nano` | Micro-badges |
45
+
46
+ ---
47
+
48
+ ## 3. Spacing Grid (Baseline Rhythm)
49
+
50
+ Vertical rhythm is managed through a base unit `--space` (usually $1\text{rem}$ / $16\text{px}$). Multiples and fractions are locked:
51
+
52
+ * **Standard Spacing (Multiples)**:
53
+ * `--space-2`, `--space-4`, `--space-8`, `--space-12`
54
+ * **Sub-units (Fractions)**:
55
+ * `--space-half` (0.5x), `--space-third` (0.33x), `--space-d4` (0.25x), `--space-d8` (0.125x)
56
+
57
+ Elements align to this grid through a strict rule: *the sum of an element's font-size, line-height, and margins must always be a multiple of `--space`.*
58
+
59
+ ---
60
+
61
+ ## 4. Color System (OKLCH Color Space)
62
+
63
+ Instead of hardcoding colors, the system generates complete color palettes dynamically. By using OKLCH color mathematics, one seed color generates borders, backgrounds, surfaces, and active states with uniform perceived brightness:
64
+
65
+ - `--color-accent`: Seed brand highlight color.
66
+ - `--color-background` / `--color-foreground`: Automatically calculated base canvas colors.
67
+ - `--color-surface`: Card/panel backgrounds.
68
+ - `--color-border`: Border colors.
69
+ - `--color-success` / `--color-warning` / `--color-error` / `--color-info`: Consistent status indicators.
70
+
71
+ ---
72
+
73
+ ## 5. Layout Modes & Templates
74
+
75
+ Specialized styling rules load automatically depending on document attributes:
76
+
77
+ * **Prose Mode** (`.prose`): Restricts reading width to an optimal measure ($\approx 65\text{ch}$) to prevent eye strain.
78
+ * **Dark Mode**: Evaluated via system settings (`prefers-color-scheme`) or overridden with the `.theme-dark` class.
79
+ * **E-Ink Mode** (`.standard-eink`): Strips out all transforms, blurs, and animations, switching colors to pure high-contrast black and white to prevent ghosting on e-readers.
80
+
81
+ ---
82
+
83
+ ## Integration
84
+
85
+ In your main SCSS stylesheet or Astro entry point:
86
+
87
+ ```scss
88
+ // Load standard variables and layouts
89
+ import "@stnd/styles/standard.scss";
90
+ ```
91
+
92
+ ### Style Files Anatomy
93
+ - `standard.scss`: Framework index.
94
+ - `_standard-01-token.scss`: Variable dictionary.
95
+ - `_standard-02-color.scss`: Color space equations.
96
+ - `_standard-03-typography.scss`: Typography stacks.
97
+ - `_standard-06-prose.scss`: Prose limits and vertical alignments.
98
+ - `_standard-11-forms.scss`: Field components.
99
+ - `_standard-32-eink.scss`: High-contrast rules.
100
+
101
+ ---
102
+
103
+ ## What's next — open
104
+
105
+ - [ ] **CSS framework audit / cleanup** — verify that everything is still up to our standard (the initial draft is old; a cleanup is likely possible).
106
+
107
+ ---
108
+
109
+ ## 🔗 Liens & Normes
110
+
111
+ Ce paquet de styles implémente la charte visuelle et les tokens de l'écosystème Standard. Pour plus de détails sur les spécifications graphiques et de code, consultez :
112
+ - **Architecture Système** : [4.1 Architecture](../../apps/stnd.build/modules/manual/content/4-system/4.1-architecture.md)
113
+ - **Principes de Code** : [4.2 Code Standards](../../apps/stnd.build/modules/manual/content/4-system/4.2-code-standards.md)
114
+ - **Normes de Documentation** : [4.9 Normes README](../../apps/stnd.build/modules/manual/content/4-system/4.9-readme-standard.md)
115
+ - **Pilier Central** : [STANDARD.md](../../STANDARD.md)
116
+ - **Charte Graphique** : [3.1 Color System](../../apps/stnd.build/modules/manual/content/3-graphics/3.1-color-system.md) et [3.2 Typography](../../apps/stnd.build/modules/manual/content/3-graphics/3.2-typography-and-typefaces.md)
package/TOKENS.md ADDED
@@ -0,0 +1,415 @@
1
+ # Standard Design Tokens
2
+
3
+ > Canonical reference for all CSS custom properties exposed by `@stnd/styles`.
4
+ > Source files: `_standard-01-token.scss`, `_standard-02-color.scss`, `_standard-03-typography.scss`, `_standard-06-prose.scss`, `_standard-14-analog.scss`.
5
+
6
+ ## Frontmatter Configuration
7
+
8
+ Standard Garden maps document-level frontmatter directly into CSS custom properties on the document root. The frontmatter key is the CSS property name without the `--` prefix.
9
+
10
+ For example, `foreground: "#1a1a1a"` becomes `--foreground: #1a1a1a`. See `packages/utils/theme-tokens.js` for the canonical token list.
11
+
12
+ ---
13
+
14
+ ## Ratios
15
+
16
+ | Token | Default | Description |
17
+ | --------------------- | ------- | ------------------ |
18
+ | `--ratio-golden` | `1.618` | Golden ratio (φ) |
19
+ | `--ratio-silver` | `1.414` | Silver ratio (√2) |
20
+ | `--ratio-halfstep` | `1.272` | Half-step ratio |
21
+ | `--ratio-quarterstep` | `1.128` | Quarter-step ratio |
22
+ | `--ratio-eighthstep` | `1.062` | Eighth-step ratio |
23
+
24
+ ## Base Measurements
25
+
26
+ | Token | Default | Description |
27
+ | -------------------- | ------------------------------------- | ------------------------------------------ |
28
+ | `--font-size` | `1rem` | Root font size |
29
+ | `--optical-ratio` | `var(--ratio-silver)` | Ratio driving the modular scale |
30
+ | `--line-height` | `var(--optical-ratio)` | Base line height |
31
+ | `--space` | `1rlh` | Official rhythm unit |
32
+ | `--leading` | `calc((line-height - 1) * font-size)` | Space between cap-height and next baseline |
33
+ | `--nl` | `calc(leading * line-height)` | Newline — full vertical unit |
34
+ | `--trim` | `calc(leading / 2)` | Half-leading trim |
35
+ | `--max-width` | `1024px` | Maximum content width |
36
+ | `--font-size-mobile` | `1.1rem` | Font size override on mobile |
37
+
38
+ ## Spacing Scale
39
+
40
+ Derived from `--baseline` (1rlh).
41
+
42
+ | Token | Value |
43
+ | -------------------------- | ------------------------ |
44
+ | `--space` | `var(--baseline)` |
45
+ | `--space-1` … `--space-12` | `calc(var(--space) * N)` |
46
+ | `--space-d2` | `calc(var(--space) / 2)` |
47
+ | `--space-d3` | `calc(var(--space) / 3)` |
48
+ | `--space-d4` | `calc(var(--space) / 4)` |
49
+
50
+ ## Optical Harmony Scale
51
+
52
+ Powered by `pow(var(--optical-ratio), N)`.
53
+
54
+ | Token | Exponent | Description |
55
+ | ------------ | -------- | ---------------------- |
56
+ | `--scale-d5` | -2 | Smallest (floor: 9px) |
57
+ | `--scale-d4` | -1.5 | |
58
+ | `--scale-d3` | -1 | |
59
+ | `--scale-d2` | -0.5 | |
60
+ | `--scale` | 0 | Base (= `--font-size`) |
61
+ | `--scale-2` | 1 | |
62
+ | `--scale-3` | 2 | |
63
+ | `--scale-4` | 3 | |
64
+ | `--scale-5` | 4 | |
65
+ | `--scale-6` | 5 | |
66
+ | `--scale-7` | 6 | |
67
+ | `--scale-8` | 7 | Largest |
68
+
69
+ ## T-Shirt Size Aliases
70
+
71
+ | Token | Maps to |
72
+ | ------------- | ------------ |
73
+ | `--size-3xs` | `--scale-d5` |
74
+ | `--size-2xs` | `--scale-d4` |
75
+ | `--size-xs` | `--scale-d3` |
76
+ | `--size-sm` | `--scale-d2` |
77
+ | `--size-base` | `--scale` |
78
+ | `--size-lg` | `--scale-2` |
79
+ | `--size-xl` | `--scale-3` |
80
+ | `--size-2xl` | `--scale-4` |
81
+ | `--size-3xl` | `--scale-5` |
82
+ | `--size-4xl` | `--scale-6` |
83
+ | `--size-5xl` | `--scale-7` |
84
+ | `--size-6xl` | `--scale-8` |
85
+
86
+ ## Line Widths
87
+
88
+ | Token | Default | Description |
89
+ | ------------------- | --------------------------------- | --------------------------------------------- |
90
+ | `--line-width-xs` | `24rem` | Extra small |
91
+ | `--line-width-sm` | `32rem` | Small |
92
+ | `--line-width-md` | `42rem` | Medium (default reading width) |
93
+ | `--line-width-lg` | `50rem` | Large |
94
+ | `--line-width-xl` | `60rem` | Extra large |
95
+ | `--line-width-full` | `calc(100vw - space*2)` | Full viewport minus gutters |
96
+ | `--line-width` | `var(--measure, --line-width-md)` | Active line width (themeable via `--measure`) |
97
+
98
+ ## Line Heights
99
+
100
+ | Token | Default | Description |
101
+ | ----------------------- | ---------------------- | ------------------- |
102
+ | `--line-height` | `var(--optical-ratio)` | Base line height |
103
+ | `--line-height-compact` | `calc(1 + (lh-1)/2)` | Tight line height |
104
+ | `--line-height-relaxed` | `calc(1 + (lh-1)*1.5)` | Relaxed line height |
105
+
106
+ ## Letter Spacing
107
+
108
+ | Token | Default | Description |
109
+ | -------------------- | --------- | ---------------- |
110
+ | `--tracking-tight` | `-0.01em` | Tight tracking |
111
+ | `--tracking-neutral` | `0em` | Neutral tracking |
112
+ | `--tracking-open` | `0.01em` | Open tracking |
113
+
114
+ ## Stroke & Radius
115
+
116
+ | Token | Default | Description |
117
+ | ------------------- | ------------------------------- | ---------------------------------------- |
118
+ | `--stroke-width` | `max(1px, 0.06rem)` | Hairline stroke |
119
+ | `--stroke-width-lg` | `calc(stroke-width * 2)` | Heavy stroke |
120
+ | `--radius` | `var(--corner, var(--leading))` | Border radius (themeable via `--corner`) |
121
+ | `--filter-blur` | `blur(8px)` | Standard blur filter |
122
+
123
+ ## Gaps
124
+
125
+ | Token | Default | Description |
126
+ | ------------------- | ------------------------------------- | --------------------- |
127
+ | `--gap-body` | `clamp(space, 0.5vi+0.5rlh, space-3)` | Body gutter |
128
+ | `--gap-grid` | `0.25lh` | Grid gutter |
129
+ | `--gap-body-mobile` | `var(--space)` | Body gutter on mobile |
130
+ | `--gap-mobile` | `1rlh` | General gap on mobile |
131
+
132
+ ## Z-Index
133
+
134
+ | Token | Value | Use case |
135
+ | ---------------- | ------ | ------------------- |
136
+ | `--z-base` | `1` | Above flow |
137
+ | `--z-dropdown` | `1000` | Dropdowns, popovers |
138
+ | `--z-modal` | `1060` | Modals, dialogs |
139
+ | `--z-toast` | `1090` | Toast notifications |
140
+ | `--z-image-zoom` | `9999` | Image lightbox |
141
+
142
+ ## Animation
143
+
144
+ | Token | Default | Description |
145
+ | ----------------- | ------------------------------ | --------------------- |
146
+ | `--duration-fast` | `0.2s` | Quick interactions |
147
+ | `--duration` | `0.5s` | Standard duration |
148
+ | `--ease` | `cubic-bezier(0.5, 0, 0.5, 1)` | Standard easing curve |
149
+ | `--transition` | `var(--duration) var(--ease)` | Shorthand transition |
150
+
151
+ ## Breakpoints
152
+
153
+ | Token | Default | Description |
154
+ | --------------------- | -------- | ----------------- |
155
+ | `--breakpoint-mobile` | `600px` | Mobile breakpoint |
156
+ | `--breakpoint-sm` | `768px` | Small screen |
157
+ | `--breakpoint-lg` | `1024px` | Large screen |
158
+ | `--breakpoint-wide` | `1440px` | Wide screen |
159
+
160
+ ---
161
+
162
+ ## Colors — OKLCH Spectrum
163
+
164
+ Generated from `--color-accent` seed via OKLCH hue rotation.
165
+
166
+ | Token | Hue | Description |
167
+ | ------------------ | ---- | ------------- |
168
+ | `--pigment-red` | 25° | Error red |
169
+ | `--pigment-yellow` | 85° | Warning amber |
170
+ | `--pigment-green` | 145° | Success green |
171
+ | `--pigment-cyan` | 190° | Info cyan |
172
+ | `--pigment-blue` | 240° | Link blue |
173
+ | `--pigment-purple` | 300° | Magic purple |
174
+
175
+ Supporting tokens: `--dna-l`, `--dna-c`, `--dna-h`, `--safe-c`, `--safe-l`.
176
+
177
+ ## Colors — Light Palette
178
+
179
+ | Token | Default | Description |
180
+ | -------------------------- | ------------------------- | ----------------- |
181
+ | `--color-light-background` | `white` | Page background |
182
+ | `--color-light-foreground` | `#262626` | Text color |
183
+ | `--color-light-accent` | `var(--color-foreground)` | Accent color |
184
+ | `--color-light-red` | `#b14c42` | Dusty red clay |
185
+ | `--color-light-orange` | `#d78a5a` | Trail-worn orange |
186
+ | `--color-light-yellow` | `#c8a840` | Parchment mustard |
187
+ | `--color-light-green` | `#5e9d80` | Sage green |
188
+ | `--color-light-cyan` | `#6ba4b6` | Glacier teal |
189
+ | `--color-light-blue` | `#4f81a4` | Faded blueprint |
190
+ | `--color-light-magenta` | `#7a6c91` | Dusk lavender |
191
+ | `--color-light-link` | `#4f81a4` | Link color |
192
+
193
+ ## Colors — Dark Palette (auto-generated)
194
+
195
+ Auto-derived from light palette via `color-mix(in oklch, light 80%, white)`.
196
+ Themes can override individual values.
197
+
198
+ | Token | Default | Description |
199
+ | ------------------------- | ------------------------------ | ----------------- |
200
+ | `--color-dark-background` | `#0f0f0f` | Page background |
201
+ | `--color-dark-foreground` | `#dbdbdb` | Text color |
202
+ | `--color-dark-accent` | `var(--color-light-accent)` | Accent color |
203
+ | `--color-dark-red` | auto | Lightened red |
204
+ | `--color-dark-orange` | auto | Lightened orange |
205
+ | `--color-dark-yellow` | auto | Lightened yellow |
206
+ | `--color-dark-green` | auto | Lightened green |
207
+ | `--color-dark-cyan` | auto | Lightened cyan |
208
+ | `--color-dark-blue` | auto | Lightened blue |
209
+ | `--color-dark-magenta` | auto | Lightened magenta |
210
+ | `--color-dark-link` | auto | Lightened link |
211
+ | `--color-dark-on-accent` | `var(--color-dark-background)` | Text on accent |
212
+
213
+ ## Colors — Auto-Accent Strategies
214
+
215
+ Standard provides three automatic strategies to generate an accent color from your foreground text hue. By default, the system uses the `triadic` strategy for a balanced contrast. You can explicitly override `--color-[light/dark]-accent` in your theme using any of these strategies:
216
+
217
+ | Token | Description |
218
+ | --- | --- |
219
+ | `--color-[light/dark]-accent-complementary` | Opposite side of the color wheel (+180°). Provides maximum, aggressive contrast. |
220
+ | `--color-[light/dark]-accent-triadic` | A third of the way around (+120°). Balanced, strong but natural contrast (Default). |
221
+ | `--color-[light/dark]-accent-analogous` | Next to the seed color (+30°). Harmonious, subtle, camaïeu effect. |
222
+
223
+ ## Colors — Semantic
224
+
225
+ Active tokens that resolve to light or dark palette.
226
+
227
+ | Token | Description |
228
+ | -------------------- | ------------------------------------ |
229
+ | `--color-background` | Page background |
230
+ | `--color-foreground` | Primary text |
231
+ | `--color-accent` | Primary accent |
232
+ | `--color-header` | Heading color (fallback: foreground) |
233
+ | `--color-red` | Red hue |
234
+ | `--color-orange` | Orange hue |
235
+ | `--color-yellow` | Yellow hue |
236
+ | `--color-green` | Green hue |
237
+ | `--color-cyan` | Cyan hue |
238
+ | `--color-blue` | Blue hue |
239
+ | `--color-magenta` | Magenta hue |
240
+ | `--color-success` | = `--color-green` |
241
+ | `--color-warning` | = `--color-yellow` |
242
+ | `--color-error` | = `--color-red` |
243
+ | `--color-info` | = `--color-blue` |
244
+ | `--color-link` | Link color |
245
+ | `--color-italic` | Italic text color |
246
+ | `--color-bold` | Bold text color |
247
+ | `--color-on-accent` | Text on accent background |
248
+
249
+ ## Colors — Computed
250
+
251
+ | Token | Value | Description |
252
+ | ---------------------- | --------------------------- | ------------------------ |
253
+ | `--color-muted` | `foreground 60%` | Muted text |
254
+ | `--color-subtle` | `foreground 40%` | Subtle text / decoration |
255
+ | `--color-border` | `foreground 10%` | Default border |
256
+ | `--color-surface-low` | `foreground 3%` opaque | Slight surface tint |
257
+ | `--color-surface` | `foreground 3%` opaque | Secondary background |
258
+ | `--color-surface-high` | `foreground 5%` transparent | Hover state |
259
+ | `--color-darker` | `dark 15%` transparent | Shadow helper |
260
+ | `--color-light` | light background | Pole light |
261
+ | `--color-dark` | light foreground | Pole dark |
262
+ | `--color-shadow` | `dark 5%` transparent | Shadow color base |
263
+
264
+ ## Surface Elevation
265
+
266
+ Progressive foreground tinting for depth. Pairs with shadow presets.
267
+
268
+ | Token | Tint | Shadow | Use case |
269
+ | ------------------------- | --------------- | ------------- | ----------------------- |
270
+ | `--color-surface-lowest` | 14% (background) | none | Page background |
271
+ | `--color-surface-low` | 7% | `--shadow` | Cards, inputs |
272
+ | `--color-surface` | 3% | `--shadow-lg` | Raised panels, popovers |
273
+ | `--color-surface-high` | 7% | `--shadow-xl` | Overlays, drawers |
274
+ | `--color-surface-highest` | 14% | `--shadow-xl` | Modals, toasts |
275
+
276
+ ## Shadows (Layered System)
277
+
278
+ Composable shadow primitives. Combine freely with comma-separated values.
279
+
280
+ ### Building Blocks
281
+
282
+ | Token | Description |
283
+ | ------------------ | ---------------------------- |
284
+ | `--shadow-ambient` | Subtle ground-contact shadow |
285
+ | `--shadow-lift` | Directional elevation shadow |
286
+ | `--shadow-glow` | Accent-tinted halo |
287
+ | `--shadow-inset` | Pressed/recessed effect |
288
+ | `--shadow-ring` | Border-like inset ring |
289
+
290
+ ### Composed Presets
291
+
292
+ | Token | Composition | Description |
293
+ | ------------- | --------------------- | ------------------------------- |
294
+ | `--shadow` | ambient | Default subtle shadow |
295
+ | `--shadow-lg` | ambient + lift | Medium elevation |
296
+ | `--shadow-xl` | ambient + lift + glow | High elevation with accent glow |
297
+
298
+ ### Usage
299
+
300
+ ```css
301
+ /* Use presets */
302
+ box-shadow: var(--shadow-lg);
303
+
304
+ /* Or compose custom combinations */
305
+ box-shadow: var(--shadow-ring), var(--shadow-lift);
306
+ box-shadow: var(--shadow-inset), var(--shadow-ambient);
307
+ ```
308
+
309
+ ## Borders
310
+
311
+ | Token | Value | Description |
312
+ | ---------------------- | --------------------------------- | ------------------------------------- |
313
+ | `--border` | `stroke-width solid border-color` | Default border |
314
+ | `--border-transparent` | `stroke-width solid transparent` | Transparent border (layout stability) |
315
+ | `--border-accent` | `stroke-width solid accent 7%` | Accent-tinted border |
316
+
317
+ ## Tooltip
318
+
319
+ | Token | Default | Description |
320
+ | ---------------------- | ------------------------------- | ------------------ |
321
+ | `--tooltip-background` | `#1a1a1a` | Tooltip background |
322
+ | `--tooltip-text` | `#ffffff` | Tooltip text |
323
+ | `--tooltip-ease` | `cubic-bezier(0.25, 1, 0.5, 1)` | Tooltip animation |
324
+
325
+ ---
326
+
327
+ ## Typography — Font Stacks
328
+
329
+ | Token | Default | Description |
330
+ | ------------------ | ---------------------------- | ---------------- |
331
+ | `--font-sans` | Instrument Sans, system-ui | Sans-serif stack |
332
+ | `--font-serif` | Newsreader, Instrument Serif | Serif stack |
333
+ | `--font-monospace` | IBM Plex Mono, ui-monospace | Monospace stack |
334
+
335
+ ## Typography — Semantic Roles
336
+
337
+ | Token | Default | Description |
338
+ | ------------------ | ------------------ | ----------- |
339
+ | `--font-text` | `var(--font-sans)` | Body text |
340
+ | `--font-header` | `"Inter"` | Headings |
341
+ | `--font-interface` | `var(--font-sans)` | UI elements |
342
+
343
+ ## Typography — Weights
344
+
345
+ | Token | Default | Description |
346
+ | ---------------------- | --------------------------- | -------------- |
347
+ | `--font-weight` | `400` | Body weight |
348
+ | `--font-weight-bold` | `600` | Bold weight |
349
+ | `--font-header-weight` | `700` | Heading weight |
350
+ | `--font-weight-h1` | `var(--font-header-weight)` | H1 weight |
351
+ | `--font-weight-h2` | `max(header*0.85, body)` | H2 weight |
352
+ | `--font-weight-h3` | `max(header*0.85, body)` | H3 weight |
353
+ | `--font-weight-h4` | `var(--font-weight)` | H4 weight |
354
+ | `--font-weight-h5` | `var(--font-weight)` | H5 weight |
355
+ | `--font-weight-h6` | `var(--font-weight)` | H6 weight |
356
+
357
+ ## Typography — OpenType Features
358
+
359
+ | Token | Default | Description |
360
+ | ---------------------------- | -------------------------------- | ------------------------ |
361
+ | `--font-inter-feature` | `"calt", "cv05", "cv11", "ss03"` | Inter-specific features |
362
+ | `--font-instrument-feature` | `"figa", "ss01", "ss02", "ss05"` | Instrument Sans features |
363
+ | `--font-feature` | `""` | Body text features |
364
+ | `--font-variation` | `"wdth" 95` | Body text variation axes |
365
+ | `--font-header-feature` | `""` | Header features |
366
+ | `--font-header-variation` | `""` | Header variation axes |
367
+ | `--font-monospace-feature` | `""` | Monospace features |
368
+ | `--font-monospace-variation` | `""` | Monospace variation axes |
369
+ | `--font-interface-feature` | `"dlig", "zero"` | Interface features |
370
+ | `--font-interface-variation` | `""` | Interface variation axes |
371
+ | `--font-list-feature` | `"dlig", "tnum", "zero"` | List features |
372
+ | `--font-list-variation` | `""` | List variation axes |
373
+
374
+ ## Typography — Other
375
+
376
+ | Token | Default | Description |
377
+ | ------------------------------ | -------------- | --------------------- |
378
+ | `--font-letter-spacing` | `normal` | Body letter spacing |
379
+ | `--font-header-letter-spacing` | `normal` | Header letter spacing |
380
+ | `--font-header-line-height` | `1` | Header line height |
381
+ | `--list-indent` | `var(--space)` | List indentation |
382
+
383
+ ---
384
+
385
+ ## Layout — Prose Grid
386
+
387
+ | Token | Default | Description |
388
+ | --------------------------- | ----------------------------- | ------------------------ |
389
+ | `--content-width` | `min(--line-width, 100%)` | Content column width |
390
+ | `--content-width-sm` | `max(space-2 - space, space)` | Sidebar margin inset |
391
+ | `--content-width-editorial` | `minmax(0, --space-2)` | Editorial column |
392
+ | `--content-width-feature` | `minmax(0, --space-4)` | Feature column |
393
+ | `--content-width-hero` | `minmax(0, 1fr)` | Hero (full bleed) column |
394
+
395
+ ## Analog (Noise Overlay)
396
+
397
+ | Token | Default | Description |
398
+ | ------------------------- | ------------ | --------------- |
399
+ | `--noise-overlay` | SVG data URI | Noise texture |
400
+ | `--noise-overlay-opacity` | `0.08` | Overlay opacity |
401
+ | `--noise-overlay-blend` | `multiply` | Blend mode |
402
+
403
+ ---
404
+
405
+ ## Forced Colors (High Contrast)
406
+
407
+ Under `@media (forced-colors: active)`:
408
+
409
+ | Token | Maps to |
410
+ | -------------------- | ------------ |
411
+ | `--color-background` | `Canvas` |
412
+ | `--color-foreground` | `CanvasText` |
413
+ | `--color-accent` | `Highlight` |
414
+ | `--color-border` | `CanvasText` |
415
+ | `--color-muted` | `GrayText` |
@@ -0,0 +1,74 @@
1
+ /* =========================== */
2
+ /* RESET */
3
+ /* =========================== */
4
+
5
+ /* Disable view transition animations - instant page swaps
6
+ ::view-transition {
7
+ animation-duration: 0s !important;
8
+ }
9
+ ::view-transition-old(*),
10
+ ::view-transition-new(*) {
11
+ animation: none !important;
12
+ }
13
+ */
14
+
15
+ *,
16
+ ::after,
17
+ ::before,
18
+ ::backdrop,
19
+ ::file-selector-button {
20
+ box-sizing: border-box;
21
+ border-width: 0;
22
+ scrollbar-width: thin;
23
+ }
24
+
25
+ /*
26
+ * Modern targeted reset (replaces the old `* { margin: 0; padding: 0 }`).
27
+ * This prevents the framework from destroying the native margins/paddings of complex
28
+ * embedded editors (like CodeMirror/Obsidian) or third-party web widgets, while still
29
+ * perfectly resetting the standard web typography and layout elements.
30
+ */
31
+ html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6, img, span, a {
32
+ margin: 0;
33
+ padding: 0;
34
+ border: 0 solid;
35
+ }
36
+
37
+ button, input, select {
38
+ margin: 0;
39
+ }
40
+
41
+ ol,
42
+ ul,
43
+ menu {
44
+ list-style: none;
45
+ }
46
+
47
+ img,
48
+ video,
49
+ canvas,
50
+ audio,
51
+ iframe,
52
+ embed,
53
+ object {
54
+ display: block;
55
+ vertical-align: middle;
56
+ }
57
+ svg {
58
+ display: inline-block;
59
+ vertical-align: middle;
60
+ }
61
+
62
+ img,
63
+ video {
64
+ max-width: 100%;
65
+ height: auto;
66
+ }
67
+
68
+ [hidden]:where(:not([hidden="until-found"])) {
69
+ display: none !important;
70
+ }
71
+
72
+ script {
73
+ display: none !important;
74
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @component SCSS Variables & Mixins
3
+ * @category Foundation
4
+ * @description Responsive breakpoints and rhythm application mixins for consistent
5
+ * vertical rhythm and spacing across all elements. These mixins ensure proper
6
+ * spacing application for rhythm-aware components.
7
+ *
8
+ * @prop {variable} $mobile Mobile breakpoint (480px)
9
+ * @prop {variable} $small Small screen breakpoint (768px)
10
+ * @prop {variable} $large Large screen breakpoint (1024px)
11
+ * @prop {variable} $wide Wide screen breakpoint (1440px)
12
+ *
13
+ * @example
14
+ * // Using breakpoint variables
15
+ * @media (min-width: $small) {
16
+ * font-size: 1.2rem;
17
+ * }
18
+ *
19
+ * // Using rhythm mixin
20
+ * @include apply-rhythm {
21
+ * margin-bottom: var(--space);
22
+ * }
23
+ *
24
+ * @since 0.1.0
25
+ * @see standard-01-token.scss
26
+ */
27
+
28
+ $mobile: 600px;
29
+ $small: 768px;
30
+ $large: 1024px;
31
+ $wide: 1440px;
32
+
33
+ $text-elements: "a, kbd, div, span, mark, callout-title::before, span, li::before, button, legend, fieldset, label, li, h1, h2, h3, h4, h5, h6, p:not(:has(img)), figcaption, dt, dd, label, td, th, .callout, code, .lined, aside";
34
+
35
+ $rhythm-simple-tags: ".alert, #comments, h1, h2, h3, h4, h5, h6, blockquote, ul, ol, li, dl, dt, dd, p, pre, figure, hr, form, fieldset, button, aside, .callout, .card, .box, .btn, .grid";
36
+ $rhythm-double-tags: "table, blockquote, div:has(.video), section, article, header, footer, hr, #comments, .callout, pre, figure, p:has(img), section, .box, .card, .small, .editorial, .feature, .hero, .full, .scroll, hr, aside, .stnd-code-block";
37
+ $rhythm-tags: $rhythm-simple-tags + ", div, " + $rhythm-double-tags;
38
+
39
+ $elements-boxed: "blockquote, pre, .alert, aside, .card, .callout, img, iframe, .outset";
40
+
41
+ %surface {
42
+ border: none;
43
+ /* Raised effect for all surfaces */
44
+ box-shadow: var(--shadow-raised);
45
+ background: var(--color-surface);
46
+ border-radius: var(--radius);
47
+ }
48
+
49
+ %padding-text {
50
+ padding: var(--space-d4) var(--space-d2);
51
+ }
52
+
53
+ $stnd-scope: ":root, body" !default;
54
+ $stnd-theme-scope: ":root" !default;