@stnd/styles 0.10.3 → 0.10.5
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/README.md +2 -2
- package/TOKENS.md +51 -72
- package/_standard-00-variables.scss +3 -3
- package/_standard-01-token.scss +44 -124
- package/_standard-02-color.scss +34 -64
- package/_standard-03-typography.scss +17 -17
- package/_standard-04-grid.scss +1 -1
- package/_standard-05-rhythm.scss +8 -8
- package/_standard-06-prose.scss +41 -68
- package/_standard-07-base.scss +16 -42
- package/_standard-08-media.scss +1 -1
- package/_standard-09-lists.scss +3 -3
- package/_standard-10-tables.scss +2 -2
- package/_standard-11-forms.scss +13 -13
- package/_standard-12-code.scss +3 -2
- package/_standard-13-components.scss +78 -74
- package/_standard-31-print.scss +3 -9
- package/_standard-50-utilities.scss +114 -158
- package/_standard-99-debug.scss +5 -5
- package/app.scss +1 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -183,8 +183,8 @@ All 17 files verified via a running dev server (both `stnd.gd` and `stnd.build`)
|
|
|
183
183
|
- **`.rhythm`'s base 1x-spacing rule has no `>` combinator; every other rule in the same block does** (`_standard-05-rhythm.scss`) — applies at any nesting depth instead of direct children only. Left alone: adding `>` risks a real regression on nested content (e.g. a paragraph inside a `.callout` inside `.rhythm`) that's impossible to fully rule out without a visual pass over every place `.rhythm` is used.
|
|
184
184
|
- **`.compact`/`.relaxed` are unnamespaced and collide across `_standard-09-lists.scss` and `_standard-50-utilities.scss`** — resolving this properly means renaming part of the framework's public class API, which is an architectural decision, not a mechanical fix.
|
|
185
185
|
|
|
186
|
-
**
|
|
187
|
-
- The `generate-scale` mixin's `"trim"
|
|
186
|
+
**Resolved:**
|
|
187
|
+
- The `generate-scale` mixin's `"trim"` and `"leading"` scale keys (feeding `.mt-trim`, `.mb-leading`, etc.) now directly connect to the real vertical rhythm tokens `var(--trim)` and `var(--leading)`, aligning spacing utilities with typographic rhythm. Invalid combinations like `padding: auto` and `gap: auto` are filtered out.
|
|
188
188
|
|
|
189
189
|
**Where the mechanism is real but the hook is currently unused:**
|
|
190
190
|
- `--corner` (theme override for `--radius`) — documented, no theme sets
|
package/TOKENS.md
CHANGED
|
@@ -80,42 +80,17 @@ Powered by `pow(var(--optical-ratio), N)`.
|
|
|
80
80
|
| `--scale-7` | 6 | |
|
|
81
81
|
| `--scale-8` | 7 | Largest |
|
|
82
82
|
|
|
83
|
-
## T-Shirt Size Aliases
|
|
84
|
-
|
|
85
|
-
| Token | Maps to |
|
|
86
|
-
| ------------- | ------------ |
|
|
87
|
-
| `--size-3xs` | `--scale-d5` |
|
|
88
|
-
| `--size-2xs` | `--scale-d4` |
|
|
89
|
-
| `--size-xs` | `--scale-d3` |
|
|
90
|
-
| `--size-sm` | `--scale-d2` |
|
|
91
|
-
| `--size-base` | `--scale` |
|
|
92
|
-
| `--size-lg` | `--scale-2` |
|
|
93
|
-
| `--size-xl` | `--scale-3` |
|
|
94
|
-
| `--size-2xl` | `--scale-4` |
|
|
95
|
-
| `--size-3xl` | `--scale-5` |
|
|
96
|
-
| `--size-4xl` | `--scale-6` |
|
|
97
|
-
| `--size-5xl` | `--scale-7` |
|
|
98
|
-
| `--size-6xl` | `--scale-8` |
|
|
99
|
-
|
|
100
83
|
## Layout Widths
|
|
101
84
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
| `--
|
|
111
|
-
| `--body-max-width` | `900px` | The whole page shell — header, footer, content, and the ceiling `.hero`/`.full` grow into |
|
|
112
|
-
| `--line-width-xs` | `24rem` | Extra small |
|
|
113
|
-
| `--line-width-sm` | `32rem` | Small |
|
|
114
|
-
| `--line-width-md` | `42rem` | Medium (default reading width) |
|
|
115
|
-
| `--line-width-lg` | `50rem` | Large |
|
|
116
|
-
| `--line-width-xl` | `60rem` | Extra large |
|
|
117
|
-
| `--line-width-full` | `calc(100vw - space*2)` | Full viewport minus gutters |
|
|
118
|
-
| `--line-width` | `var(--measure, --line-width-md)` | Active line width (themeable via `--measure`) |
|
|
85
|
+
The page layout uses a two-tier containment model: `--page-max-width` defines the outer
|
|
86
|
+
viewport boundary for the page shell, header, and footer, while `--prose-width` defines the
|
|
87
|
+
optimal reading measure for readable text elements (60–75 characters). Breakout tracks
|
|
88
|
+
extend outwards from `--prose-width` in rhythm steps towards `--page-max-width`.
|
|
89
|
+
|
|
90
|
+
| Token | Default | Description |
|
|
91
|
+
| ------------------ | --------- | --------------------------------------------------------------------- |
|
|
92
|
+
| `--page-max-width` | `1400px` | The whole page shell — header, footer, content, and breakout ceiling |
|
|
93
|
+
| `--prose-width` | `42rem` | Active readable column measure (60–75 characters) |
|
|
119
94
|
|
|
120
95
|
## Line Heights
|
|
121
96
|
|
|
@@ -133,25 +108,31 @@ token — they break out by a fixed rhythm increment off `--line-width`
|
|
|
133
108
|
| `--tracking-neutral` | `0em` | Neutral tracking |
|
|
134
109
|
| `--tracking-open` | `0.01em` | Open tracking |
|
|
135
110
|
|
|
136
|
-
## Stroke &
|
|
111
|
+
## Stroke, Radius & Interactive States
|
|
137
112
|
|
|
138
113
|
| Token | Default | Description |
|
|
139
114
|
| ------------------- | ------------------------------- | ---------------------------------------- |
|
|
140
115
|
| `--stroke-width` | `max(1px, 0.06rem)` | Hairline stroke |
|
|
141
|
-
| `--stroke-width-lg` | `calc(stroke-width * 2)`
|
|
142
|
-
| `--radius
|
|
143
|
-
| `--radius`
|
|
144
|
-
| `--
|
|
116
|
+
| `--stroke-width-lg` | `calc(var(--stroke-width) * 2)` | Heavy stroke |
|
|
117
|
+
| `--radius` | `var(--leading)` | Macro border radius (cards, panels) |
|
|
118
|
+
| `--radius-sm` | `var(--trim)` | Micro border radius (buttons, tags, inputs)|
|
|
119
|
+
| `--border` | `var(--stroke-width) solid var(--color-border)` | Active border state |
|
|
120
|
+
| `--border-hover` | `var(--stroke-width) solid var(--color-foreground)` | Hover border state |
|
|
121
|
+
| `--shadow` | Layered elevation | Resting shadow |
|
|
122
|
+
| `--shadow-hover` | Layered elevation + glow | Active hover shadow |
|
|
145
123
|
| `--filter-blur` | `blur(8px)` | Standard blur filter |
|
|
146
124
|
|
|
147
|
-
##
|
|
125
|
+
## Layout Padding & Vertical Rhythm
|
|
148
126
|
|
|
149
|
-
| Token
|
|
150
|
-
|
|
|
151
|
-
| `--
|
|
152
|
-
| `--
|
|
153
|
-
| `--
|
|
154
|
-
| `--
|
|
127
|
+
| Token | Default | Description |
|
|
128
|
+
| ---------------------- | ----------------------------- | --------------------------------------------------------------- |
|
|
129
|
+
| `--page-padding` | `clamp(1rem, 3vw, 2.5rem)` | Fluid horizontal page gutter (desktop and mobile) |
|
|
130
|
+
| `--rhythm-block-scale` | `2` | Vertical rhythm multiplier for non-text block elements |
|
|
131
|
+
| `--space` | `1rlh` | Fundamental vertical rhythm unit |
|
|
132
|
+
| `--space-half` | `calc(var(--space) / 2)` | Half-step vertical rhythm unit |
|
|
133
|
+
| `--gap` | `calc(var(--space))` | Rhythm layout gap |
|
|
134
|
+
| `--gap-compact` | `var(--trim)` | Compact micro-gap for inline groups and chips |
|
|
135
|
+
| `--gap-grid` | `0.25lh` | Grid gutter |
|
|
155
136
|
|
|
156
137
|
## Z-Index
|
|
157
138
|
|
|
@@ -277,25 +258,24 @@ Active tokens that resolve to light or dark palette.
|
|
|
277
258
|
| `--color-muted` | `foreground 60%` | Muted text |
|
|
278
259
|
| `--color-subtle` | `foreground 40%` | Subtle text / decoration |
|
|
279
260
|
| `--color-border` | `foreground 10%` | Default border |
|
|
280
|
-
| `--color-surface
|
|
281
|
-
| `--color-surface
|
|
282
|
-
| `--color-surface-
|
|
283
|
-
| `--color-
|
|
284
|
-
| `--color-
|
|
285
|
-
| `--color-dark`
|
|
286
|
-
| `--color-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
| `--color-surface-highest` | 14% | `--shadow-xl` | Modals, toasts |
|
|
261
|
+
| `--color-surface` | `var(--color-surface-light-1)` | Active base surface |
|
|
262
|
+
| `--color-surface-light-1`| `color-mix(in srgb, white 4%, bg)` | Light step 1 (subtle lift)|
|
|
263
|
+
| `--color-surface-light-2`| `color-mix(in srgb, white 9%, bg)` | Light step 2 (cards) |
|
|
264
|
+
| `--color-surface-light-3`| `color-mix(in srgb, white 16%, bg)` | Light step 3 (popovers) |
|
|
265
|
+
| `--color-surface-dark-1` | `color-mix(in srgb, black 4%, bg)` | Dark step 1 (subtle wells)|
|
|
266
|
+
| `--color-surface-dark-2` | `color-mix(in srgb, black 9%, bg)` | Dark step 2 (wells/inputs)|
|
|
267
|
+
| `--color-surface-dark-3` | `color-mix(in srgb, black 16%, bg)` | Dark step 3 (deep wells) |
|
|
268
|
+
| `--color-darker` | `dark 15%` transparent | Shadow helper |
|
|
269
|
+
| `--color-light` | light background | Pole light |
|
|
270
|
+
| `--color-dark` | light foreground | Pole dark |
|
|
271
|
+
| `--color-shadow` | `dark 5%` transparent | Shadow color base |
|
|
272
|
+
|
|
273
|
+
## Directional Surfaces
|
|
274
|
+
|
|
275
|
+
Standard uses directional surface tokens relative to canvas background:
|
|
276
|
+
- **Light steps (`--color-surface-light-1..3`)**: Blend subtle amounts of white into the background canvas, lifting elements up into elevation regardless of light/dark mode.
|
|
277
|
+
- **Dark steps (`--color-surface-dark-1..3`)**: Blend subtle amounts of black into the background canvas, sinking elements into wells/recessed areas.
|
|
278
|
+
- **Default surface (`--color-surface`)**: Resolves to `--color-surface-light-1` by default, customizable per theme.
|
|
299
279
|
|
|
300
280
|
## Shadows (Layered System)
|
|
301
281
|
|
|
@@ -408,13 +388,12 @@ box-shadow: var(--shadow-inset), var(--shadow-ambient);
|
|
|
408
388
|
|
|
409
389
|
## Layout — Prose Grid
|
|
410
390
|
|
|
411
|
-
| Token
|
|
412
|
-
|
|
|
413
|
-
| `--
|
|
414
|
-
| `--
|
|
415
|
-
| `--
|
|
416
|
-
| `--
|
|
417
|
-
| `--content-width-hero` | `minmax(0, 1fr)` | Hero (full bleed) column |
|
|
391
|
+
| Token | Default | Description |
|
|
392
|
+
| ---------------------- | -------------------------------------------- | --------------------------- |
|
|
393
|
+
| `--prose-width` | `42rem` | Optimal reading line length |
|
|
394
|
+
| `--prose-inset` | `max(calc(var(--space-2) - var(--space)), var(--space))` | Narrow elements margin inset |
|
|
395
|
+
| `--prose-breakout` | `minmax(0, var(--space))` | Wide breakout column track |
|
|
396
|
+
| `--prose-track-full` | `minmax(0, 1fr)` | Full page breakout track |
|
|
418
397
|
|
|
419
398
|
## Analog (Noise Overlay)
|
|
420
399
|
|
|
@@ -45,11 +45,11 @@ $text-elements: "a, kbd, div, span, mark, callout-title::before, span, li::befor
|
|
|
45
45
|
// Vertical rhythm system (_standard-05-rhythm.scss): consecutive "simple"
|
|
46
46
|
// elements get 1x --gap margin between them; the moment either neighbor is
|
|
47
47
|
// a "double" (heavier block-level: tables, cards, figures, sections...) the
|
|
48
|
-
// margin becomes --
|
|
48
|
+
// margin becomes --space * --rhythm-block-scale (2x by default) — extra
|
|
49
49
|
// breathing room around visually heavier blocks. $rhythm-tags is the union,
|
|
50
50
|
// used for the heading-follows-anything spacing rules.
|
|
51
51
|
$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";
|
|
52
|
-
$rhythm-double-tags: "table, blockquote, div:has(.video), section, article, header, footer, hr, #comments, .callout, pre, figure, p:has(img), section, .box, .card, .
|
|
52
|
+
$rhythm-double-tags: "table, blockquote, div:has(.video), section, article, header, footer, hr, #comments, .callout, pre, figure, p:has(img), section, .box, .card, .narrow, .wide, .full, .scroll, hr, aside, .stnd-code-block";
|
|
53
53
|
$rhythm-tags: $rhythm-simple-tags + ", div, " + $rhythm-double-tags;
|
|
54
54
|
|
|
55
55
|
// Reusable style fragments via @extend (not applied directly — SCSS
|
|
@@ -66,7 +66,7 @@ $rhythm-tags: $rhythm-simple-tags + ", div, " + $rhythm-double-tags;
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
%padding-text {
|
|
69
|
-
padding: var(--
|
|
69
|
+
padding: var(--trim) var(--leading);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// Single-target on purpose (not ":root, body") — a token declared on both
|
package/_standard-01-token.scss
CHANGED
|
@@ -92,23 +92,20 @@
|
|
|
92
92
|
--nl: calc(var(--leading) * var(--line-height));
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* @name Rhythm &
|
|
96
|
-
* @description Spacing intervals between major layout blocks, page sections,
|
|
95
|
+
* @name Rhythm & Page Padding
|
|
96
|
+
* @description Spacing intervals between major layout blocks, page sections, and screen edges.
|
|
97
97
|
*
|
|
98
|
-
* @property {variable} --gap Dynamic gap between rhythm blocks (`calc(var(--space)
|
|
99
|
-
* @property {variable} --gap-
|
|
100
|
-
* @property {variable} --
|
|
101
|
-
* @property {variable} --gap-
|
|
102
|
-
* @property {variable} --
|
|
103
|
-
* @property {variable} --gap-multiplicator Gutter multiplier factor (`2`).
|
|
98
|
+
* @property {variable} --gap Dynamic gap between rhythm blocks (`calc(var(--space))`).
|
|
99
|
+
* @property {variable} --gap-compact Compact micro-gap for inline groups, metadata, breadcrumbs (`var(--trim)`).
|
|
100
|
+
* @property {variable} --page-padding Fluid outer margin/padding preventing content from touching device bezels (`clamp(1rem, 3vw, 2.5rem)`).
|
|
101
|
+
* @property {variable} --gap-grid-img Micro-gap separating adjacent images in rhythm grids (`var(--space-half)`).
|
|
102
|
+
* @property {variable} --rhythm-block-scale Ratio multiplier factor for non-text blocks (`2`).
|
|
104
103
|
*/
|
|
105
|
-
/* Gap, space between blocks in rhythm, goes to --space in mobile */
|
|
106
104
|
--gap: calc(var(--space));
|
|
107
|
-
--gap-
|
|
108
|
-
--
|
|
109
|
-
--gap-
|
|
110
|
-
--
|
|
111
|
-
--gap-multiplicator: 2;
|
|
105
|
+
--gap-compact: var(--trim);
|
|
106
|
+
--page-padding: clamp(1rem, 3vw, 2.5rem);
|
|
107
|
+
--gap-grid-img: var(--space-half);
|
|
108
|
+
--rhythm-block-scale: 2;
|
|
112
109
|
|
|
113
110
|
/**
|
|
114
111
|
* @name Breakpoints
|
|
@@ -125,18 +122,16 @@
|
|
|
125
122
|
--breakpoint-wide: #{$wide};
|
|
126
123
|
|
|
127
124
|
/**
|
|
128
|
-
* @name
|
|
129
|
-
* @description Grid breakout track sizes allowing
|
|
125
|
+
* @name Prose Breakout Tracks & Insets
|
|
126
|
+
* @description Grid breakout track sizes allowing wide content and full-width elements to extend past the reading measure, plus narrow element insets.
|
|
130
127
|
*
|
|
131
|
-
* @property {variable} --
|
|
132
|
-
* @property {variable} --
|
|
133
|
-
* @property {variable} --
|
|
134
|
-
* @property {variable} --content-width-hero Full-bleed hero breakout track width (`minmax(0, 1fr)`).
|
|
128
|
+
* @property {variable} --prose-inset Narrow layout inset margin (`max(calc(var(--space-2) - var(--space)), var(--space))`).
|
|
129
|
+
* @property {variable} --prose-breakout Wide column breakout track width (`minmax(0, var(--space))`).
|
|
130
|
+
* @property {variable} --prose-track-full Full-width page breakout track (`minmax(0, 1fr)`).
|
|
135
131
|
*/
|
|
136
|
-
--
|
|
137
|
-
--
|
|
138
|
-
--
|
|
139
|
-
--content-width-hero: minmax(0, 1fr);
|
|
132
|
+
--prose-inset: max(calc(var(--space-2) - var(--space)), var(--space));
|
|
133
|
+
--prose-breakout: minmax(0, var(--space));
|
|
134
|
+
--prose-track-full: minmax(0, 1fr);
|
|
140
135
|
|
|
141
136
|
/**
|
|
142
137
|
* @name Stroke, Radius & Filters
|
|
@@ -144,22 +139,17 @@
|
|
|
144
139
|
*
|
|
145
140
|
* @property {variable} --stroke-width Hairline border stroke width (`max(1px, 0.06rem)`).
|
|
146
141
|
* @property {variable} --stroke-width-lg Heavy border stroke width (`calc(var(--stroke-width) * 2)`).
|
|
147
|
-
* @property {variable} --radius
|
|
148
|
-
* @property {variable} --radius-sm
|
|
142
|
+
* @property {variable} --radius Macro border radius for cards, dialogs, and large containers (`var(--leading)`).
|
|
143
|
+
* @property {variable} --radius-sm Micro border radius for tags, badges, buttons, and inputs (`var(--trim)`).
|
|
149
144
|
* @property {variable} --filter-blur Standard blur filter (`blur(8px)`).
|
|
150
145
|
* @property {variable} --filter-glass Deep glassmorphic blur filter for overlays and floating panels (`blur(20px)`).
|
|
151
146
|
*/
|
|
152
|
-
/* Design system tokens */
|
|
153
147
|
--filter-blur: blur(8px);
|
|
154
148
|
--filter-glass: blur(20px);
|
|
155
149
|
--stroke-width: max(1px, 0.06rem);
|
|
156
150
|
--stroke-width-lg: calc(var(--stroke-width) * 2);
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
(proportional to line-height/font-size) today. Not dead, just unused. */
|
|
160
|
-
--radius: var(--corner, var(--leading));
|
|
161
|
-
--radius-sm: min(8px, var(--radius));
|
|
162
|
-
--radius-lg: calc(var(--radius) * 1.5);
|
|
151
|
+
--radius: var(--leading);
|
|
152
|
+
--radius-sm: var(--trim);
|
|
163
153
|
|
|
164
154
|
/**
|
|
165
155
|
* @name Shadows & Elevation
|
|
@@ -217,38 +207,11 @@
|
|
|
217
207
|
* @name Layout & Reading Widths
|
|
218
208
|
* @description Column constraints for prose reading measure and outer page boundaries.
|
|
219
209
|
*
|
|
220
|
-
* @property {variable} --
|
|
221
|
-
* @property {variable} --
|
|
222
|
-
* @property {variable} --line-width-sm Small reading width (`32rem`).
|
|
223
|
-
* @property {variable} --line-width-md Medium reading width (`42rem`). Optimal reading line length (approx. 65-75 characters).
|
|
224
|
-
* @property {variable} --line-width-lg Large reading width (`50rem`).
|
|
225
|
-
* @property {variable} --line-width-xl Extra-large reading width (`60rem`).
|
|
226
|
-
* @property {variable} --line-width-full Full viewport width minus gutters (`calc(100vw - (var(--space) * 2))`).
|
|
227
|
-
* @property {variable} --line-width Active reading column measure. Resolves `--font-line-width`, `--measure`, or `--line-width-md`.
|
|
228
|
-
* @property {variable} --content-width Effective content width constrained to container (`min(var(--line-width), 100%)`).
|
|
210
|
+
* @property {variable} --page-max-width Maximum width of the entire page shell (`1400px`).
|
|
211
|
+
* @property {variable} --prose-width Optimal reading line length (approx. 65 characters / `42rem`).
|
|
229
212
|
*/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
elements grow into it too. line-width is a single line of readable
|
|
233
|
-
text — .feature and tables/.editorial break out by a fixed rhythm
|
|
234
|
-
increment off this (space-2 / space-4 each side), not off
|
|
235
|
-
body-max-width. */
|
|
236
|
-
--body-max-width: 900px;
|
|
237
|
-
|
|
238
|
-
--line-width-xs: 24rem;
|
|
239
|
-
--line-width-sm: 32rem;
|
|
240
|
-
--line-width-md: 42rem;
|
|
241
|
-
--line-width-lg: 50rem;
|
|
242
|
-
--line-width-xl: 60rem;
|
|
243
|
-
--line-width-full: calc(100vw - (var(--space) * 2));
|
|
244
|
-
/* --font-line-width is the theme-authoring hook (e.g. humanist, book,
|
|
245
|
-
2064 themes); --measure is a second, editor-specific override read by
|
|
246
|
-
apps/stnd.gd's Writer component. Same override-ladder shape as
|
|
247
|
-
--font-ratio above — a note's frontmatter can also set --line-width
|
|
248
|
-
directly, bypassing both. */
|
|
249
|
-
--line-width: var(--font-line-width, var(--measure, var(--line-width-md)));
|
|
250
|
-
|
|
251
|
-
--content-width: min(var(--line-width), 100%);
|
|
213
|
+
--page-max-width: 1400px;
|
|
214
|
+
--prose-width: 42rem;
|
|
252
215
|
|
|
253
216
|
/**
|
|
254
217
|
* @name Line Heights & Letter Spacing
|
|
@@ -313,10 +276,10 @@
|
|
|
313
276
|
* @name Optical Harmony Scale & Sizes
|
|
314
277
|
* @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.
|
|
315
278
|
*
|
|
316
|
-
* @property {variable} --scale-d5 Sub-base optical step -5 (`max(calc(var(--font-size)
|
|
317
|
-
* @property {variable} --scale-d4 Sub-base optical step -4 (`max(calc(var(--font-size)
|
|
318
|
-
* @property {variable} --scale-d3 Sub-base optical step -3 (`max(calc(var(--font-size)
|
|
319
|
-
* @property {variable} --scale-d2 Sub-base optical step -2 (`max(calc(var(--font-size)
|
|
279
|
+
* @property {variable} --scale-d5 Sub-base optical step -5 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -2)), 9px)`).
|
|
280
|
+
* @property {variable} --scale-d4 Sub-base optical step -4 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -1.5)), 9px)`).
|
|
281
|
+
* @property {variable} --scale-d3 Sub-base optical step -3 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -1)), 9px)`).
|
|
282
|
+
* @property {variable} --scale-d2 Sub-base optical step -2 (`max(calc(var(--font-size) * pow(var(--optical-ratio), -0.5)), 9px)`).
|
|
320
283
|
* @property {variable} --scale Base optical scale step (`var(--font-size)`).
|
|
321
284
|
* @property {variable} --scale-2 Super-base optical step 2 (`calc(var(--font-size) * var(--optical-ratio))`).
|
|
322
285
|
* @property {variable} --scale-3 Super-base optical step 3 (`calc(var(--scale-2) * var(--optical-ratio))`).
|
|
@@ -325,36 +288,15 @@
|
|
|
325
288
|
* @property {variable} --scale-6 Super-base optical step 6 (`calc(var(--scale-5) * var(--optical-ratio))`).
|
|
326
289
|
* @property {variable} --scale-7 Super-base optical step 7 (`calc(var(--scale-6) * var(--optical-ratio))`).
|
|
327
290
|
* @property {variable} --scale-8 Super-base optical step 8 (`calc(var(--scale-7) * var(--optical-ratio))`).
|
|
328
|
-
* @property {variable} --size-3xs T-shirt size alias for `--scale-d5`. Used for micro-badges and metadata captions.
|
|
329
|
-
* @property {variable} --size-2xs T-shirt size alias for `--scale-d4`. Used for tooltips, footnotes, and tags.
|
|
330
|
-
* @property {variable} --size-xs T-shirt size alias for `--scale-d3`. Used for secondary labels and table metadata.
|
|
331
|
-
* @property {variable} --size-sm T-shirt size alias for `--scale-d2`. Used for UI controls, inputs, and captions.
|
|
332
|
-
* @property {variable} --size-base T-shirt size alias for `--scale`. Base body text size (`1rem`).
|
|
333
|
-
* @property {variable} --size-lg T-shirt size alias for `--scale-2`. Subheadings and lead paragraphs.
|
|
334
|
-
* @property {variable} --size-xl T-shirt size alias for `--scale-3`. Section headers (`h3`).
|
|
335
|
-
* @property {variable} --size-2xl T-shirt size alias for `--scale-4`. Major headings (`h2`).
|
|
336
|
-
* @property {variable} --size-3xl T-shirt size alias for `--scale-5`. Page titles (`h1`).
|
|
337
|
-
* @property {variable} --size-4xl T-shirt size alias for `--scale-6`. Hero display headings.
|
|
338
|
-
* @property {variable} --size-5xl T-shirt size alias for `--scale-7`. Large hero numbers and display text.
|
|
339
|
-
* @property {variable} --size-6xl T-shirt size alias for `--scale-8`. Maximum display typography scale.
|
|
340
291
|
*/
|
|
341
292
|
/* Optical harmony scale. --scale-2 upward is a clean geometric progression
|
|
342
293
|
(each step = previous * --optical-ratio). Below base (d5..d2) the
|
|
343
|
-
|
|
344
|
-
ratio^-2
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
--scale-
|
|
349
|
-
calc(var(--font-size) / (var(--optical-ratio) * var(--optical-ratio))),
|
|
350
|
-
11px
|
|
351
|
-
);
|
|
352
|
-
--scale-d4: max(calc(var(--font-size) / (var(--optical-ratio) * 1.25)), 11px);
|
|
353
|
-
--scale-d3: max(calc(var(--font-size) / var(--optical-ratio)), 11px);
|
|
354
|
-
--scale-d2: max(
|
|
355
|
-
calc(var(--font-size) / (1 + (var(--optical-ratio) - 1) * 0.5)),
|
|
356
|
-
11px
|
|
357
|
-
);
|
|
294
|
+
scale steps down by fractional power increments (ratio^-0.5, ratio^-1,
|
|
295
|
+
ratio^-1.5, ratio^-2) floored at 9px so micro text stays legible and distinct. */
|
|
296
|
+
--scale-d5: max(calc(var(--font-size) * pow(var(--optical-ratio), -2)), 9px);
|
|
297
|
+
--scale-d4: max(calc(var(--font-size) * pow(var(--optical-ratio), -1.5)), 9px);
|
|
298
|
+
--scale-d3: max(calc(var(--font-size) * pow(var(--optical-ratio), -1)), 9px);
|
|
299
|
+
--scale-d2: max(calc(var(--font-size) * pow(var(--optical-ratio), -0.5)), 9px);
|
|
358
300
|
--scale: var(--font-size);
|
|
359
301
|
--scale-2: calc(var(--font-size) * var(--optical-ratio));
|
|
360
302
|
--scale-3: calc(var(--scale-2) * var(--optical-ratio));
|
|
@@ -364,34 +306,13 @@
|
|
|
364
306
|
--scale-7: calc(var(--scale-6) * var(--optical-ratio));
|
|
365
307
|
--scale-8: calc(var(--scale-7) * var(--optical-ratio));
|
|
366
308
|
|
|
367
|
-
/* Industrial Size Scale (T-Shirt Aliases) */
|
|
368
|
-
--size-3xs: var(--scale-d5);
|
|
369
|
-
--size-2xs: var(--scale-d4);
|
|
370
|
-
--size-xs: var(--scale-d3);
|
|
371
|
-
--size-sm: var(--scale-d2);
|
|
372
|
-
--size-base: var(--scale);
|
|
373
|
-
--size-lg: var(--scale-2);
|
|
374
|
-
--size-xl: var(--scale-3);
|
|
375
|
-
--size-2xl: var(--scale-4);
|
|
376
|
-
--size-3xl: var(--scale-5);
|
|
377
|
-
--size-4xl: var(--scale-6);
|
|
378
|
-
--size-5xl: var(--scale-7);
|
|
379
|
-
--size-6xl: var(--scale-8);
|
|
380
|
-
|
|
381
309
|
/**
|
|
382
310
|
* @name Mobile Settings
|
|
383
311
|
* @description Responsive overrides applied on mobile screen sizes.
|
|
384
312
|
*
|
|
385
313
|
* @property {variable} --font-size-mobile Base font size override on mobile viewports (`1.125rem`).
|
|
386
|
-
* @property {variable} --gap-body-mobile Body gutter override on mobile viewports (`var(--space)`).
|
|
387
|
-
* @property {variable} --gap-mobile General layout gap override on mobile viewports (`var(--space)`).
|
|
388
|
-
* @property {variable} --gap-header-mobile Header gutter override on mobile viewports (`var(--space-4)`).
|
|
389
314
|
*/
|
|
390
|
-
/* Mobile settings */
|
|
391
315
|
--font-size-mobile: 1.125rem;
|
|
392
|
-
--gap-body-mobile: var(--space);
|
|
393
|
-
--gap-mobile: var(--space);
|
|
394
|
-
--gap-header-mobile: var(--space-4);
|
|
395
316
|
|
|
396
317
|
/**
|
|
397
318
|
* @name Z-Index Scale
|
|
@@ -538,23 +459,22 @@
|
|
|
538
459
|
#{$text-elements},
|
|
539
460
|
a {
|
|
540
461
|
text-box-trim: trim-both;
|
|
541
|
-
text-box-edge: cap
|
|
462
|
+
text-box-edge: cap text;
|
|
542
463
|
}
|
|
543
464
|
|
|
544
|
-
/* Table cells opt back out of text-box-trim — vertical-align/padding
|
|
545
|
-
|
|
546
|
-
|
|
465
|
+
/* Table cells and site footers opt back out of text-box-trim — vertical-align/padding
|
|
466
|
+
math and compact interface metadata don't play well with trimmed line boxes,
|
|
467
|
+
so they keep normal line-box sizing instead. */
|
|
547
468
|
td,
|
|
548
|
-
th
|
|
469
|
+
th,
|
|
470
|
+
footer,
|
|
471
|
+
.stnd-footer {
|
|
549
472
|
text-box-trim: none;
|
|
550
473
|
}
|
|
551
474
|
|
|
552
475
|
/* Responsive adjustments */
|
|
553
476
|
@media only screen and (max-width: #{$small}) {
|
|
554
477
|
#{$stnd-theme-scope} {
|
|
555
|
-
--gap-body: var(--gap-body-mobile) !important;
|
|
556
|
-
--gap-header: var(--gap-header-mobile) !important;
|
|
557
|
-
--gap: var(--gap-mobile) !important;
|
|
558
478
|
--font-size: var(--font-size-mobile) !important;
|
|
559
479
|
}
|
|
560
480
|
}
|