@stnd/styles 0.5.1 → 0.5.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 +12 -0
- package/LICENSE +21 -0
- package/README.md +117 -21
- package/TOKENS.md +26 -4
- package/_standard-00-reset.scss +64 -5
- package/_standard-00-variables.scss +39 -11
- package/_standard-01-token.scss +324 -28
- package/_standard-02-color.scss +208 -86
- package/_standard-03-typography.scss +88 -121
- package/_standard-04-grid.scss +31 -30
- package/_standard-05-rhythm.scss +43 -0
- package/_standard-06-prose.scss +28 -40
- package/_standard-07-base.scss +44 -34
- package/_standard-08-media.scss +42 -29
- package/_standard-09-lists.scss +72 -17
- package/_standard-10-tables.scss +51 -3
- package/_standard-11-forms.scss +43 -10
- package/_standard-12-code.scss +84 -2
- package/_standard-13-components.scss +63 -33
- package/_standard-14-analog.scss +30 -4
- package/_standard-30-contrast.scss +20 -7
- package/_standard-31-print.scss +28 -1
- package/_standard-32-eink.scss +30 -3
- package/_standard-50-utilities.scss +39 -38
- package/_standard-99-debug.scss +25 -18
- package/obsidian.scss +5 -4
- package/package.json +5 -8
- package/standard.scss +11 -5
- package/dist/obsidian.css +0 -31
- package/dist/obsidian.css.map +0 -1
- package/dist/standard.css +0 -20
- package/dist/standard.css.map +0 -1
package/_standard-01-token.scss
CHANGED
|
@@ -4,10 +4,20 @@
|
|
|
4
4
|
* @component Design Tokens
|
|
5
5
|
* @category Foundation
|
|
6
6
|
* @description Primitive design tokens forming the foundation of the design system.
|
|
7
|
-
* Includes mathematical ratios, modular scales, spacing system,
|
|
7
|
+
* Includes mathematical ratios, modular scales, spacing system, layout widths, z-index hierarchy, animation curves, and seed colors.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#{$stnd-scope} {
|
|
10
|
+
#{$stnd-theme-scope} {
|
|
11
|
+
/**
|
|
12
|
+
* @name Color Seeds & Tooltips
|
|
13
|
+
* @description Primary background and foreground seeds from which the OKLCH relative color engine derives full palettes, plus tooltip defaults.
|
|
14
|
+
*
|
|
15
|
+
* @property {variable} --color-light-background Light mode root page background seed (`white`).
|
|
16
|
+
* @property {variable} --color-light-foreground Light mode root text foreground seed (`#262626`). Derives dark mode seeds and the full 10-hue chromatic wheel.
|
|
17
|
+
* @property {variable} --tooltip-background Default tooltip container background (`var(--color-dark, #1a1a1a)`).
|
|
18
|
+
* @property {variable} --tooltip-text Default tooltip text color (`var(--color-light, #ffffff)`).
|
|
19
|
+
*/
|
|
20
|
+
|
|
11
21
|
/* ===== COLOR SEEDS =====
|
|
12
22
|
The two primary seeds from which everything grows.
|
|
13
23
|
Set these and the color file (_standard-02-color.scss) does the rest:
|
|
@@ -33,13 +43,45 @@
|
|
|
33
43
|
foreground's OKLCH hue — warm ink begets warm dark mode. */
|
|
34
44
|
|
|
35
45
|
/* Tooltip defaults */
|
|
36
|
-
--tooltip-background: #1a1a1a;
|
|
37
|
-
--tooltip-text: #ffffff;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
--tooltip-background: var(--color-dark, #1a1a1a);
|
|
47
|
+
--tooltip-text: var(--color-light, #ffffff);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @name Base Measurements & Vertical Rhythm
|
|
51
|
+
* @description Core measurements governing typography and vertical cadence. Includes fluid viewport scaling and baseline rhythm anchoring.
|
|
52
|
+
*
|
|
53
|
+
* @property {variable} --optical-ratio Modular scale ratio. Resolves theme hook `--font-ratio` with fallback to `--ratio-silver`.
|
|
54
|
+
* @property {variable} --physics-slope Ratio growth physics slope derived from optical ratio (`max(calc(var(--optical-ratio) - 1), 0.15)`).
|
|
55
|
+
* @property {variable} --fluid-growth Viewport-responsive growth increment (`calc(var(--physics-slope) * 1.2vw)`).
|
|
56
|
+
* @property {variable} --base-size Root font size base (defaults to `--font-text-size` or `1.0625rem`).
|
|
57
|
+
* @property {variable} --font-size Clamped fluid font size that scales smoothly between mobile and wide displays.
|
|
58
|
+
* @property {variable} --density-base Reading density base resolving from `--font-density` or `--optical-ratio`.
|
|
59
|
+
* @property {variable} --line-height Clamped fluid unitless line height (1.35 to 1.75).
|
|
60
|
+
* @property {variable} --baseline Official rhythm unit (`1rlh`). Drives vertical spacing across all components.
|
|
61
|
+
* @property {variable} --trim Half-leading trim applied to typography box edges (`calc(var(--leading) / 2)`).
|
|
62
|
+
* @property {variable} --leading Space between font cap-height and the next baseline (`calc((var(--line-height) - 1) * var(--font-size))`).
|
|
63
|
+
* @property {variable} --nl Newline unit representing a full vertical rhythm step (`calc(var(--leading) * var(--line-height))`).
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/* Base measurements & ratios. --font-ratio / --font-density are the
|
|
67
|
+
theme-authoring hooks (set by ~a dozen packages/themes/*.scss files,
|
|
68
|
+
e.g. --font-ratio: 1.414) — --optical-ratio / --line-height are the
|
|
69
|
+
resolved, framework-consumed values. */
|
|
41
70
|
--optical-ratio: var(--font-ratio, var(--ratio-silver));
|
|
42
|
-
|
|
71
|
+
|
|
72
|
+
/* Fluid typography slopes: the optical ratio drives responsiveness */
|
|
73
|
+
--physics-slope: max(calc(var(--optical-ratio) - 1), 0.15);
|
|
74
|
+
--fluid-growth: calc(var(--physics-slope) * 1.2vw);
|
|
75
|
+
--base-size: var(--font-text-size, 1.0625rem);
|
|
76
|
+
--font-size: clamp(
|
|
77
|
+
var(--base-size),
|
|
78
|
+
calc(var(--base-size) + var(--fluid-growth)),
|
|
79
|
+
calc(var(--base-size) * 1.3)
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
/* Fluid line-height: resolves from theme density or optical ratio */
|
|
83
|
+
--density-base: var(--font-density, var(--optical-ratio));
|
|
84
|
+
--line-height: clamp(1.35, var(--density-base), 1.75);
|
|
43
85
|
|
|
44
86
|
/* Baseline: the official rhythm unit */
|
|
45
87
|
--baseline: 1rlh;
|
|
@@ -49,33 +91,117 @@
|
|
|
49
91
|
--leading: calc((var(--line-height) - 1) * var(--font-size));
|
|
50
92
|
--nl: calc(var(--leading) * var(--line-height));
|
|
51
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @name Rhythm & Gaps
|
|
96
|
+
* @description Spacing intervals between major layout blocks, page sections, headers, and footers.
|
|
97
|
+
*
|
|
98
|
+
* @property {variable} --gap Dynamic gap between rhythm blocks (`calc(var(--space) * var(--optical-ratio))`).
|
|
99
|
+
* @property {variable} --gap-body Standard gutter for body content containers (`var(--space-2)`).
|
|
100
|
+
* @property {variable} --gap-header Top margin gutter above page headers (`var(--space-8)`).
|
|
101
|
+
* @property {variable} --gap-footer Bottom margin gutter above page footers (`calc(var(--gap-body) * 1.5)`).
|
|
102
|
+
* @property {variable} --gap-grid-img Micro-gap separating adjacent images in rhythm grids (`var(--space-d4)`).
|
|
103
|
+
* @property {variable} --gap-multiplicator Gutter multiplier factor (`2`).
|
|
104
|
+
*/
|
|
52
105
|
/* Gap, space between blocks in rhythm, goes to --space in mobile */
|
|
53
|
-
--gap: var(--space);
|
|
106
|
+
--gap: calc(var(--space) * var(--optical-ratio));
|
|
54
107
|
--gap-body: var(--space-2);
|
|
55
108
|
--gap-header: var(--space-8);
|
|
56
109
|
--gap-footer: calc(var(--gap-body) * 1.5);
|
|
57
110
|
--gap-grid-img: var(--space-d4);
|
|
58
111
|
--gap-multiplicator: 2;
|
|
59
112
|
|
|
113
|
+
/**
|
|
114
|
+
* @name Breakpoints
|
|
115
|
+
* @description Viewport boundaries for responsive layout adaptations across mobile, tablet, and desktop displays.
|
|
116
|
+
*
|
|
117
|
+
* @property {variable} --breakpoint-mobile Mobile viewport breakpoint boundary (`#{$mobile}`).
|
|
118
|
+
* @property {variable} --breakpoint-sm Small tablet and compact screen breakpoint boundary (`#{$small}`).
|
|
119
|
+
* @property {variable} --breakpoint-lg Large desktop screen breakpoint boundary (`#{$large}`).
|
|
120
|
+
* @property {variable} --breakpoint-wide Ultra-wide display breakpoint boundary (`#{$wide}`).
|
|
121
|
+
*/
|
|
60
122
|
--breakpoint-mobile: #{$mobile};
|
|
61
123
|
--breakpoint-sm: #{$small};
|
|
62
124
|
--breakpoint-lg: #{$large};
|
|
63
125
|
--breakpoint-wide: #{$wide};
|
|
64
126
|
|
|
65
|
-
|
|
127
|
+
/**
|
|
128
|
+
* @name Content Breakout Widths
|
|
129
|
+
* @description Grid breakout track sizes allowing editorial content, features, and media to extend past the reading measure.
|
|
130
|
+
*
|
|
131
|
+
* @property {variable} --content-width-sm Small layout breakout track width (`max(calc(var(--space-2) - var(--space)), var(--space))`).
|
|
132
|
+
* @property {variable} --content-width-editorial Editorial column breakout track width (`minmax(0, var(--space-2))`).
|
|
133
|
+
* @property {variable} --content-width-feature Feature callout breakout track width (`minmax(0, var(--space-4))`).
|
|
134
|
+
* @property {variable} --content-width-hero Full-bleed hero breakout track width (`minmax(0, 1fr)`).
|
|
135
|
+
*/
|
|
66
136
|
--content-width-sm: max(calc(var(--space-2) - var(--space)), var(--space));
|
|
67
137
|
--content-width-editorial: minmax(0, var(--space-2));
|
|
68
138
|
--content-width-feature: minmax(0, var(--space-4));
|
|
69
139
|
--content-width-hero: minmax(0, 1fr);
|
|
70
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @name Stroke, Radius & Filters
|
|
143
|
+
* @description Hairline strokes, corner curvature, and glassmorphic backdrop filters.
|
|
144
|
+
*
|
|
145
|
+
* @property {variable} --stroke-width Hairline border stroke width (`max(1px, 0.06rem)`).
|
|
146
|
+
* @property {variable} --stroke-width-lg Heavy border stroke width (`calc(var(--stroke-width) * 2)`).
|
|
147
|
+
* @property {variable} --radius Border radius proportional to leading. Resolves theme hook `--corner` or derives proportionally from `--leading`.
|
|
148
|
+
* @property {variable} --radius-sm Small border radius for badges, inputs, and buttons (`min(8px, var(--radius))`).
|
|
149
|
+
* @property {variable} --filter-blur Standard blur filter (`blur(8px)`).
|
|
150
|
+
* @property {variable} --filter-glass Deep glassmorphic blur filter for overlays and floating panels (`blur(20px)`).
|
|
151
|
+
*/
|
|
71
152
|
/* Design system tokens */
|
|
72
153
|
--filter-blur: blur(8px);
|
|
73
154
|
--filter-glass: blur(20px);
|
|
74
155
|
--stroke-width: max(1px, 0.06rem);
|
|
75
156
|
--stroke-width-lg: calc(var(--stroke-width) * 2);
|
|
157
|
+
/* --corner is a documented theme-authoring hook (TOKENS.md) — no theme
|
|
158
|
+
currently sets it, so --radius always resolves through --leading
|
|
159
|
+
(proportional to line-height/font-size) today. Not dead, just unused. */
|
|
76
160
|
--radius: var(--corner, var(--leading));
|
|
77
161
|
--radius-sm: min(8px, var(--radius));
|
|
78
162
|
|
|
163
|
+
/**
|
|
164
|
+
* @name Shadows & Elevation
|
|
165
|
+
* @description Multi-layered elevation scale and presets driven by semantic color seeds.
|
|
166
|
+
*
|
|
167
|
+
* @property {variable} --shadow-ambient Subtle ambient contact shadow.
|
|
168
|
+
* @property {variable} --shadow-lift Medium elevation shadow with directional lift.
|
|
169
|
+
* @property {variable} --shadow-glow Atmospheric ambient glow shadow.
|
|
170
|
+
* @property {variable} --shadow-inset Inset bevel shadow.
|
|
171
|
+
* @property {variable} --shadow-ring Fine border ring inset shadow.
|
|
172
|
+
* @property {variable} --shadow-raised Layered raised preset with top highlight, hairline border, and ambient shadow.
|
|
173
|
+
* @property {variable} --shadow Default elevation shadow.
|
|
174
|
+
* @property {variable} --shadow-lg Large floating dialog/card shadow.
|
|
175
|
+
* @property {variable} --shadow-xl Maximum elevation hero shadow.
|
|
176
|
+
*/
|
|
177
|
+
--shadow-ambient: 0 1px 1px var(--color-shadow);
|
|
178
|
+
--shadow-lift:
|
|
179
|
+
0 4px 6px -1px var(--color-shadow), 0 2px 4px -2px var(--color-shadow);
|
|
180
|
+
--shadow-glow: 0 4px var(--space) oklch(from var(--color-shadow) l c h / 0.15);
|
|
181
|
+
--shadow-inset:
|
|
182
|
+
inset 0 1px 3px var(--color-shadow), inset 0 -1px 0 0 var(--color-highlight);
|
|
183
|
+
--shadow-ring:
|
|
184
|
+
inset 0px 1px 1px var(--color-border),
|
|
185
|
+
inset 1px 0px 1px var(--color-border),
|
|
186
|
+
inset -1px 0px 1px var(--color-border),
|
|
187
|
+
inset 0px -1px 1px var(--color-border);
|
|
188
|
+
--shadow-raised:
|
|
189
|
+
inset 0 1px 0 0 var(--color-highlight), 0 0 0 1px var(--color-border),
|
|
190
|
+
var(--shadow-ambient);
|
|
191
|
+
--shadow: var(--shadow-ambient);
|
|
192
|
+
--shadow-lg: var(--shadow-ambient), var(--shadow-lift);
|
|
193
|
+
--shadow-xl: var(--shadow-ambient), var(--shadow-lift), var(--shadow-glow);
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @name Mathematical Ratios
|
|
197
|
+
* @description Proportional ratios driving modular scales, typographic scaling, and harmonic layout proportions.
|
|
198
|
+
*
|
|
199
|
+
* @property {variable} --ratio-golden Golden ratio (φ ≈ 1.618). Used for golden spiral proportions and dramatic growth slopes.
|
|
200
|
+
* @property {variable} --ratio-silver Silver ratio (√2 ≈ 1.414). Default modular scale factor for typography and optical steps.
|
|
201
|
+
* @property {variable} --ratio-halfstep Half-step ratio (1.272). Moderate progression for subtle hierarchy.
|
|
202
|
+
* @property {variable} --ratio-quarterstep Quarter-step ratio (1.128). Tighter step progression for compact interfaces.
|
|
203
|
+
* @property {variable} --ratio-eighthstep Eighth-step ratio (1.062). Minimal step increment for dense data displays.
|
|
204
|
+
*/
|
|
79
205
|
/* Golden Ratio & Mathematical Precision */
|
|
80
206
|
--ratio-golden: 1.618;
|
|
81
207
|
--ratio-silver: 1.414;
|
|
@@ -83,29 +209,94 @@
|
|
|
83
209
|
--ratio-quarterstep: 1.128;
|
|
84
210
|
--ratio-eighthstep: 1.062;
|
|
85
211
|
|
|
86
|
-
|
|
212
|
+
/**
|
|
213
|
+
* @name Layout & Reading Widths
|
|
214
|
+
* @description Column constraints for prose reading measure and outer page boundaries.
|
|
215
|
+
*
|
|
216
|
+
* @property {variable} --body-max-width Maximum width of the entire page shell (`900px`). Constrains headers, prose, and footers.
|
|
217
|
+
* @property {variable} --line-width-xs Extra-small reading width (`24rem`). Ideal for cards, sidebars, and captions.
|
|
218
|
+
* @property {variable} --line-width-sm Small reading width (`32rem`).
|
|
219
|
+
* @property {variable} --line-width-md Medium reading width (`42rem`). Optimal reading line length (approx. 65-75 characters).
|
|
220
|
+
* @property {variable} --line-width-lg Large reading width (`50rem`).
|
|
221
|
+
* @property {variable} --line-width-xl Extra-large reading width (`60rem`).
|
|
222
|
+
* @property {variable} --line-width-full Full viewport width minus gutters (`calc(100vw - (var(--space) * 2))`).
|
|
223
|
+
* @property {variable} --line-width Active reading column measure. Resolves `--font-line-width`, `--measure`, or `--line-width-md`.
|
|
224
|
+
* @property {variable} --content-width Effective content width constrained to container (`min(var(--line-width), 100%)`).
|
|
225
|
+
*/
|
|
226
|
+
/* Layout width — body-max-width is the whole page shell (header, footer,
|
|
227
|
+
content); .prose's own box reads it directly, so .hero/.full breakout
|
|
228
|
+
elements grow into it too. line-width is a single line of readable
|
|
229
|
+
text — .feature and tables/.editorial break out by a fixed rhythm
|
|
230
|
+
increment off this (space-2 / space-4 each side), not off
|
|
231
|
+
body-max-width. */
|
|
232
|
+
--body-max-width: 900px;
|
|
233
|
+
|
|
87
234
|
--line-width-xs: 24rem;
|
|
88
235
|
--line-width-sm: 32rem;
|
|
89
236
|
--line-width-md: 42rem;
|
|
90
237
|
--line-width-lg: 50rem;
|
|
91
238
|
--line-width-xl: 60rem;
|
|
92
239
|
--line-width-full: calc(100vw - (var(--space) * 2));
|
|
240
|
+
/* --font-line-width is the theme-authoring hook (e.g. humanist, book,
|
|
241
|
+
2064 themes); --measure is a second, editor-specific override read by
|
|
242
|
+
apps/stnd.gd's Writer component. Same override-ladder shape as
|
|
243
|
+
--font-ratio above — a note's frontmatter can also set --line-width
|
|
244
|
+
directly, bypassing both. */
|
|
93
245
|
--line-width: var(--font-line-width, var(--measure, var(--line-width-md)));
|
|
94
246
|
|
|
247
|
+
--content-width: min(var(--line-width), 100%);
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @name Line Heights & Letter Spacing
|
|
251
|
+
* @description Tracking adjustments and proportional line height variants.
|
|
252
|
+
*
|
|
253
|
+
* @property {variable} --line-height-compact Compact line height (`calc(1 + (var(--line-height) - 1) / 2)`). Used for titles and tight headings.
|
|
254
|
+
* @property {variable} --line-height-relaxed Relaxed line height (`calc(1 + (var(--line-height) - 1) * 1.5)`). Used for loose longform prose.
|
|
255
|
+
* @property {variable} --tracking-tight Tight letter-spacing (`-0.01em`). Applied to large display headings.
|
|
256
|
+
* @property {variable} --tracking-neutral Normal letter-spacing (`0em`). Default for body text.
|
|
257
|
+
* @property {variable} --tracking-open Open letter-spacing (`0.01em`). Applied to uppercase labels and small caps.
|
|
258
|
+
*/
|
|
95
259
|
--line-height-compact: calc(1 + (var(--line-height) - 1) / 2);
|
|
96
260
|
--line-height-relaxed: calc(1 + (var(--line-height) - 1) * 1.5);
|
|
97
261
|
|
|
98
|
-
--max-width: 900px;
|
|
99
|
-
|
|
100
|
-
/* Named width tokens */
|
|
101
|
-
--body-max-width: var(--max-width);
|
|
102
|
-
--prose-max-width: var(--max-width);
|
|
103
|
-
|
|
104
262
|
--tracking-tight: -0.01em;
|
|
105
263
|
--tracking-neutral: 0em;
|
|
106
264
|
--tracking-open: 0.01em;
|
|
107
265
|
|
|
108
|
-
|
|
266
|
+
/**
|
|
267
|
+
* @name Spacing Scale
|
|
268
|
+
* @description Complete vertical rhythm scale derived from `--baseline` (1rlh). Division steps (`--space-d*`) subdivide the baseline; multiplication steps (`--space-*`) expand it.
|
|
269
|
+
*
|
|
270
|
+
* @property {variable} --space Base rhythm spacing unit (`var(--baseline)`, 1rlh).
|
|
271
|
+
* @property {variable} --space-half Half-space rhythm unit (`calc(var(--baseline) / 2)`).
|
|
272
|
+
* @property {variable} --space-d1 Division step 1 (`calc(var(--space) / 1)`).
|
|
273
|
+
* @property {variable} --space-d2 Division step 2 (`calc(var(--space) / 2)`). Half-step spacing for compact padding and gaps.
|
|
274
|
+
* @property {variable} --space-d3 Division step 3 (`calc(var(--space) / 3)`). One-third baseline spacing.
|
|
275
|
+
* @property {variable} --space-d4 Division step 4 (`calc(var(--space) / 4)`). Quarter baseline spacing for micro-gaps and badge padding.
|
|
276
|
+
* @property {variable} --space-d5 Division step 5 (`calc(var(--space) / 5)`).
|
|
277
|
+
* @property {variable} --space-d6 Division step 6 (`calc(var(--space) / 6)`).
|
|
278
|
+
* @property {variable} --space-d7 Division step 7 (`calc(var(--space) / 7)`).
|
|
279
|
+
* @property {variable} --space-d8 Division step 8 (`calc(var(--space) / 8)`). Micro-hairline spacing for dense lists and borders.
|
|
280
|
+
* @property {variable} --space-d9 Division step 9 (`calc(var(--space) / 9)`).
|
|
281
|
+
* @property {variable} --space-d10 Division step 10 (`calc(var(--space) / 10)`).
|
|
282
|
+
* @property {variable} --space-d11 Division step 11 (`calc(var(--space) / 11)`).
|
|
283
|
+
* @property {variable} --space-d12 Division step 12 (`calc(var(--space) / 12)`). Smallest fractional spacing step.
|
|
284
|
+
* @property {variable} --space-1 Multiplication step 1 (`calc(var(--space) * 1)`). Equals base `--space`.
|
|
285
|
+
* @property {variable} --space-2 Multiplication step 2 (`calc(var(--space) * 2)`). Standard body gutter and section spacing.
|
|
286
|
+
* @property {variable} --space-3 Multiplication step 3 (`calc(var(--space) * 3)`). Intermediate container margin.
|
|
287
|
+
* @property {variable} --space-4 Multiplication step 4 (`calc(var(--space) * 4)`). Feature breakout margin and block rhythm.
|
|
288
|
+
* @property {variable} --space-5 Multiplication step 5 (`calc(var(--space) * 5)`).
|
|
289
|
+
* @property {variable} --space-6 Multiplication step 6 (`calc(var(--space) * 6)`). Large section gap.
|
|
290
|
+
* @property {variable} --space-7 Multiplication step 7 (`calc(var(--space) * 7)`).
|
|
291
|
+
* @property {variable} --space-8 Multiplication step 8 (`calc(var(--space) * 8)`). Page header gap and macro layout spacing.
|
|
292
|
+
* @property {variable} --space-9 Multiplication step 9 (`calc(var(--space) * 9)`).
|
|
293
|
+
* @property {variable} --space-10 Multiplication step 10 (`calc(var(--space) * 10)`).
|
|
294
|
+
* @property {variable} --space-11 Multiplication step 11 (`calc(var(--space) * 11)`).
|
|
295
|
+
* @property {variable} --space-12 Multiplication step 12 (`calc(var(--space) * 12)`). Maximum rhythm spacing step.
|
|
296
|
+
*/
|
|
297
|
+
/* Spacing scale (derived from baseline). "d" prefix = divide (space-d4 =
|
|
298
|
+
space / 4), plain number = multiply (space-4 = space * 4) — same "d"
|
|
299
|
+
convention repeats below in the type scale. */
|
|
109
300
|
--space: var(--baseline);
|
|
110
301
|
--space-half: calc(var(--baseline)/2);
|
|
111
302
|
|
|
@@ -114,12 +305,47 @@
|
|
|
114
305
|
--space-#{$i}: calc(var(--space) * #{$i});
|
|
115
306
|
}
|
|
116
307
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
308
|
+
/**
|
|
309
|
+
* @name Optical Harmony Scale & Sizes
|
|
310
|
+
* @description Modular geometric scale driven by `--optical-ratio` for typography and sizing. Sub-base steps (d5..d2) use a flattened divisor and floor at 11px to protect legibility.
|
|
311
|
+
*
|
|
312
|
+
* @property {variable} --scale-d5 Sub-base optical step -5 (`max(calc(var(--font-size) / (var(--optical-ratio) * var(--optical-ratio))), 11px)`).
|
|
313
|
+
* @property {variable} --scale-d4 Sub-base optical step -4 (`max(calc(var(--font-size) / (var(--optical-ratio) * 1.25)), 11px)`).
|
|
314
|
+
* @property {variable} --scale-d3 Sub-base optical step -3 (`max(calc(var(--font-size) / var(--optical-ratio)), 11px)`).
|
|
315
|
+
* @property {variable} --scale-d2 Sub-base optical step -2 (`max(calc(var(--font-size) / (1 + (var(--optical-ratio) - 1) * 0.5)), 11px)`).
|
|
316
|
+
* @property {variable} --scale Base optical scale step (`var(--font-size)`).
|
|
317
|
+
* @property {variable} --scale-2 Super-base optical step 2 (`calc(var(--font-size) * var(--optical-ratio))`).
|
|
318
|
+
* @property {variable} --scale-3 Super-base optical step 3 (`calc(var(--scale-2) * var(--optical-ratio))`).
|
|
319
|
+
* @property {variable} --scale-4 Super-base optical step 4 (`calc(var(--scale-3) * var(--optical-ratio))`).
|
|
320
|
+
* @property {variable} --scale-5 Super-base optical step 5 (`calc(var(--scale-4) * var(--optical-ratio))`).
|
|
321
|
+
* @property {variable} --scale-6 Super-base optical step 6 (`calc(var(--scale-5) * var(--optical-ratio))`).
|
|
322
|
+
* @property {variable} --scale-7 Super-base optical step 7 (`calc(var(--scale-6) * var(--optical-ratio))`).
|
|
323
|
+
* @property {variable} --scale-8 Super-base optical step 8 (`calc(var(--scale-7) * var(--optical-ratio))`).
|
|
324
|
+
* @property {variable} --size-3xs T-shirt size alias for `--scale-d5`. Used for micro-badges and metadata captions.
|
|
325
|
+
* @property {variable} --size-2xs T-shirt size alias for `--scale-d4`. Used for tooltips, footnotes, and tags.
|
|
326
|
+
* @property {variable} --size-xs T-shirt size alias for `--scale-d3`. Used for secondary labels and table metadata.
|
|
327
|
+
* @property {variable} --size-sm T-shirt size alias for `--scale-d2`. Used for UI controls, inputs, and captions.
|
|
328
|
+
* @property {variable} --size-base T-shirt size alias for `--scale`. Base body text size (`1rem`).
|
|
329
|
+
* @property {variable} --size-lg T-shirt size alias for `--scale-2`. Subheadings and lead paragraphs.
|
|
330
|
+
* @property {variable} --size-xl T-shirt size alias for `--scale-3`. Section headers (`h3`).
|
|
331
|
+
* @property {variable} --size-2xl T-shirt size alias for `--scale-4`. Major headings (`h2`).
|
|
332
|
+
* @property {variable} --size-3xl T-shirt size alias for `--scale-5`. Page titles (`h1`).
|
|
333
|
+
* @property {variable} --size-4xl T-shirt size alias for `--scale-6`. Hero display headings.
|
|
334
|
+
* @property {variable} --size-5xl T-shirt size alias for `--scale-7`. Large hero numbers and display text.
|
|
335
|
+
* @property {variable} --size-6xl T-shirt size alias for `--scale-8`. Maximum display typography scale.
|
|
336
|
+
*/
|
|
337
|
+
/* Optical harmony scale. --scale-2 upward is a clean geometric progression
|
|
338
|
+
(each step = previous * --optical-ratio). Below base (d5..d2) the
|
|
339
|
+
divisor is deliberately NOT the mirrored geometric inverse (ratio^-1,
|
|
340
|
+
ratio^-2...) — it's flattened (ratio*1.25, then a 0.5-blended exponent
|
|
341
|
+
for d2) so small text doesn't shrink as aggressively as a pure
|
|
342
|
+
geometric scale would, staying legible; each step also floors at 11px
|
|
343
|
+
regardless of ratio math. */
|
|
344
|
+
--scale-d5: max(
|
|
345
|
+
calc(var(--font-size) / (var(--optical-ratio) * var(--optical-ratio))),
|
|
121
346
|
11px
|
|
122
347
|
);
|
|
348
|
+
--scale-d4: max(calc(var(--font-size) / (var(--optical-ratio) * 1.25)), 11px);
|
|
123
349
|
--scale-d3: max(calc(var(--font-size) / var(--optical-ratio)), 11px);
|
|
124
350
|
--scale-d2: max(
|
|
125
351
|
calc(var(--font-size) / (1 + (var(--optical-ratio) - 1) * 0.5)),
|
|
@@ -148,21 +374,73 @@
|
|
|
148
374
|
--size-5xl: var(--scale-7);
|
|
149
375
|
--size-6xl: var(--scale-8);
|
|
150
376
|
|
|
377
|
+
/**
|
|
378
|
+
* @name Mobile Settings
|
|
379
|
+
* @description Responsive overrides applied on mobile screen sizes.
|
|
380
|
+
*
|
|
381
|
+
* @property {variable} --font-size-mobile Base font size override on mobile viewports (`1.125rem`).
|
|
382
|
+
* @property {variable} --gap-body-mobile Body gutter override on mobile viewports (`var(--space)`).
|
|
383
|
+
* @property {variable} --gap-mobile General layout gap override on mobile viewports (`var(--space)`).
|
|
384
|
+
* @property {variable} --gap-header-mobile Header gutter override on mobile viewports (`var(--space-4)`).
|
|
385
|
+
*/
|
|
151
386
|
/* Mobile settings */
|
|
152
387
|
--font-size-mobile: 1.125rem;
|
|
153
388
|
--gap-body-mobile: var(--space);
|
|
154
389
|
--gap-mobile: var(--space);
|
|
155
390
|
--gap-header-mobile: var(--space-4);
|
|
156
391
|
|
|
392
|
+
/**
|
|
393
|
+
* @name Z-Index Scale
|
|
394
|
+
* @description Consistent stacking order hierarchy preventing z-index collisions.
|
|
395
|
+
*
|
|
396
|
+
* @property {variable} --z-base Base stacking layer above standard document flow (`1`).
|
|
397
|
+
* @property {variable} --z-header Sticky page header layer (`900`).
|
|
398
|
+
* @property {variable} --z-launcher Command launcher and quick-search palette (`1000`).
|
|
399
|
+
* @property {variable} --z-dropdown Dropdowns, popovers, and context menus (`1100`).
|
|
400
|
+
* @property {variable} --z-modal Modal dialogs and backdrop scrims (`1200`).
|
|
401
|
+
* @property {variable} --z-toast Toast notifications and system alerts (`2000`).
|
|
402
|
+
* @property {variable} --z-image-zoom Fullscreen lightbox image zoom overlay (`9999`).
|
|
403
|
+
*/
|
|
157
404
|
/* Z-index scale */
|
|
158
405
|
--z-base: 1;
|
|
159
406
|
--z-dropdown: 1100;
|
|
160
407
|
--z-modal: 1200;
|
|
161
408
|
--z-toast: 2000;
|
|
162
409
|
--z-header: 900;
|
|
163
|
-
--z-launher
|
|
410
|
+
/* Fixed 2026-07-14 — was --z-launher (typo for launcher), renamed. Still
|
|
411
|
+
unused/unreferenced anywhere, but at least spelled correctly now. */
|
|
412
|
+
--z-launcher: 1000;
|
|
164
413
|
--z-image-zoom: 9999;
|
|
165
414
|
|
|
415
|
+
/**
|
|
416
|
+
* @name Animation, Timing & Curves
|
|
417
|
+
* @description Cubic bezier easing curves, transition durations, and physics-driven motion presets.
|
|
418
|
+
*
|
|
419
|
+
* @property {variable} --ease-snappy Fast response curve for small icons and toggles (`cubic-bezier(0.2, 0, 0, 1)`).
|
|
420
|
+
* @property {variable} --ease-standard Standard curve for general UI transitions (`cubic-bezier(0.4, 0, 0.2, 1)`).
|
|
421
|
+
* @property {variable} --ease-soft Gentle curve for large modals, overlays, and drawer panels (`cubic-bezier(0.16, 1, 0.3, 1)`).
|
|
422
|
+
* @property {variable} --ease-emphasis Weighted curve with anticipation and subtle overshoot (`cubic-bezier(0.34, 1.56, 0.64, 1)`).
|
|
423
|
+
* @property {variable} --ease-aggressive Rapid acceleration curve for urgent transitions (`cubic-bezier(0.7, 0, 0.3, 1)`).
|
|
424
|
+
* @property {variable} --ease-stnd Standard signature ease curve (`cubic-bezier(0, 0.3, 0, 1)`).
|
|
425
|
+
* @property {variable} --ease-stnd-heavy Heavy standard signature ease curve (`cubic-bezier(0.5, 0, 0, 1)`).
|
|
426
|
+
* @property {variable} --ease-invisibolt Sudden bolt curve (`cubic-bezier(1, 0, 0, 1)`).
|
|
427
|
+
* @property {variable} --ease-friction Analog physical friction curve with swift attack and long taper (`cubic-bezier(0.22, 1, 0.36, 1)`).
|
|
428
|
+
* @property {variable} --duration-instant Instant duration for micro-interactions (`100ms`).
|
|
429
|
+
* @property {variable} --duration-fast Fast duration for button hover, active states, and menus (`350ms`).
|
|
430
|
+
* @property {variable} --duration-standard Standard duration for UI component state transitions (`500ms`).
|
|
431
|
+
* @property {variable} --duration-slow Slow duration for large panels, dialogs, and navigation sheets (`1000ms`).
|
|
432
|
+
* @property {variable} --transition-fast Fast transition shorthand (`0.5s var(--ease-friction)`).
|
|
433
|
+
* @property {variable} --transition Standard transition shorthand (`1s var(--ease-friction)`).
|
|
434
|
+
* @property {variable} --transition-slow Slow transition shorthand (`2s var(--ease-friction)`).
|
|
435
|
+
* @property {variable} --ease-shape-snappy Snappy shape alias curve (`cubic-bezier(0.2, 0, 0, 1)`).
|
|
436
|
+
* @property {variable} --ease-shape-bounce Bouncy shape alias curve with overshoot (`cubic-bezier(0.34, 1.56, 0.64, 1)`).
|
|
437
|
+
* @property {variable} --ease-shape-soft Soft shape alias curve (`cubic-bezier(0.16, 1, 0.3, 1)`).
|
|
438
|
+
* @property {variable} --ease-interaction Preset transition for interactive controls (`var(--duration-fast) var(--ease-shape-snappy)`).
|
|
439
|
+
* @property {variable} --ease-feedback Preset transition for validation and feedback states (`var(--duration-standard) var(--ease-shape-bounce)`).
|
|
440
|
+
* @property {variable} --ease-surface Preset transition for large panels and sidebars (`var(--duration-slow) var(--ease-shape-soft)`).
|
|
441
|
+
* @property {variable} --ease-enter Preset transition for entering elements (`var(--duration-fast) ease-out`).
|
|
442
|
+
* @property {variable} --ease-exit Preset transition for exiting elements (`var(--duration-standard) ease-in`).
|
|
443
|
+
*/
|
|
166
444
|
/* The *“Snappy”* - for small icons or toggles (Short duration) */
|
|
167
445
|
--ease-snappy: cubic-bezier(0.2, 0, 0, 1);
|
|
168
446
|
|
|
@@ -186,7 +464,10 @@
|
|
|
186
464
|
/* Analog : It starts with a burst of energy (the push) and spends 80% of its time slowly losing that energy. */
|
|
187
465
|
--ease-friction: cubic-bezier(0.22, 1, 0.36, 1);
|
|
188
466
|
|
|
189
|
-
/*
|
|
467
|
+
/* Reference notes only, not live code — mixes prose with invalid CSS
|
|
468
|
+
(e.g. "Soft Fade Out" as a bare declaration) on purpose, scratch
|
|
469
|
+
rationale for the eases defined around it, not meant to be uncommented.
|
|
470
|
+
Animation
|
|
190
471
|
a {
|
|
191
472
|
text-decoration-color: rgba(0,0,0,0);
|
|
192
473
|
transition: text-decoration-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -237,6 +518,17 @@
|
|
|
237
518
|
/* Enter/Exit (Modals, tooltips) */
|
|
238
519
|
--ease-enter: var(--duration-fast) ease-out;
|
|
239
520
|
--ease-exit: var(--duration-standard) ease-in;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @name Theme Authoring Hooks
|
|
524
|
+
* @description Documented custom property hooks intended for themes (`packages/themes/*`) and document frontmatter overrides.
|
|
525
|
+
*
|
|
526
|
+
* @property {variable} --font-ratio Theme-authoring hook to override the optical modular scale factor (e.g. `1.414`).
|
|
527
|
+
* @property {variable} --font-density Theme-authoring hook to override base line height density.
|
|
528
|
+
* @property {variable} --font-line-width Theme-authoring hook to override default reading column measure.
|
|
529
|
+
* @property {variable} --measure Editor and writer component hook to override active text measure.
|
|
530
|
+
* @property {variable} --corner Theme-authoring hook to override base border radius.
|
|
531
|
+
*/
|
|
240
532
|
}
|
|
241
533
|
|
|
242
534
|
#{$text-elements},
|
|
@@ -245,6 +537,14 @@ a {
|
|
|
245
537
|
text-box-edge: cap alphabetic;
|
|
246
538
|
}
|
|
247
539
|
|
|
540
|
+
/* Table cells opt back out of text-box-trim — vertical-align/padding math
|
|
541
|
+
in table cells doesn't play well with the trimmed ascender/descender
|
|
542
|
+
box, so cells keep normal line-box sizing instead. */
|
|
543
|
+
td,
|
|
544
|
+
th {
|
|
545
|
+
text-box-trim: none;
|
|
546
|
+
}
|
|
547
|
+
|
|
248
548
|
/* Responsive adjustments */
|
|
249
549
|
@media only screen and (max-width: #{$small}) {
|
|
250
550
|
#{$stnd-theme-scope} {
|
|
@@ -255,10 +555,6 @@ a {
|
|
|
255
555
|
}
|
|
256
556
|
}
|
|
257
557
|
|
|
258
|
-
#{$stnd-theme-scope} {
|
|
259
|
-
--ease-aggressive: cubic-bezier(0.7, 0, 0.3, 1);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
558
|
::view-transition-old(root),
|
|
263
559
|
::view-transition-new(root) {
|
|
264
560
|
animation-duration: 500ms;
|