@skirbi/pinta 0.0.28 → 0.0.30

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.
@@ -4,47 +4,446 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
6
 
7
- /*
8
- * @skirbi/pinta — default skirbi theme (engine + showcase defaults)
7
+ /**
8
+ * @page skirbi.pinta @skirbi/pinta
9
+ * @description
10
+ *
11
+ * Pinta is skirbi's theme song.
12
+ *
13
+ * It provides:
14
+ *
15
+ * - opt-in theme activation through `[skirbi-theme]`
16
+ * - stable cascade layers
17
+ * - theme tokens and derivations
18
+ * - final page and surface tokens
19
+ * - light Semtic component recipes
20
+ * - styling for [@skirbi/semtic](https://www.npmjs.com/package/@skirbi/semtic)
21
+ * components
22
+ *
23
+ * Pinta is CSS-only. There is no runtime JavaScript.
24
+ *
25
+ * Pinta is not a utility framework, a Tailwind replacement, a Bootstrap clone,
26
+ * or a layout engine. You can use tailwind and pinta in the same project.
9
27
  *
10
- * Pinta is an opinionated default theme that is designed to "just work".
11
- * It is also a showcase: every important knob is exposed as a CSS variable.
28
+ * ## Contract
12
29
  *
13
- * OPT-IN
14
- * - This file does nothing unless `[skirbi-theme]` is present.
15
- * - `[skirbi-theme]` enables the engine (tokens + derivations + component
16
- * recipes).
17
- * - Theme authors can override any knob in `@layer theme`.
30
+ * Pinta follows the 80% rule: sensible defaults, clean tokens,
31
+ * predictable recipes, and easy overrides with normal CSS.
18
32
  *
19
- * CASCADE LAYERS
20
- * - The layer order is defined here so downstream consumers can reliably
21
- * override.
33
+ */
34
+
35
+ /**
36
+ * @page pinta.layers Layers
37
+ * @parent skirbi.pinta 0
38
+ * @description
39
+ * Pinta defines a stable layer order so downstream themes and apps can
40
+ * predictably override the defaults.
22
41
  *
23
- * CONTRACT (short)
24
- * - skirbi-base: opt-in gated structural + accessibility defaults
25
- * - skirbi-theme: pinta defaults (palette + pointers + knob defaults) +
26
- * theme author overrides
27
- * - skirbi-transform: final derived tokens from theme values
28
- * - skirbi-components: light defaults for semantic elements
29
- * - skirbi-app: your application overrides. Always comes last.
42
+ * ```css
43
+ * @@layer skirbi-base, skirbi-theme, skirbi-transform, skirbi-components,
44
+ * skirbi-app;
45
+ * ```
30
46
  *
31
- * IMPORTANT: Status colors are semantic, not branding.
32
- * See the "STATUS COLOR CONTRACT" block below.
47
+ * Layer contract:
33
48
  *
34
- * 80% rule:
35
- * - skirbi-theme exposes knobs + sensible defaults (for the default theme
36
- * only)
37
- **/
49
+ * | Layer | Purpose |
50
+ * | --- | --- |
51
+ * | `skirbi-base` | Opt-in gated structural, typography, and accessibility defaults. |
52
+ * | `skirbi-theme` | Pinta defaults and theme-author overrides. |
53
+ * | `skirbi-transform` | Derived colors and final tokens. |
54
+ * | `skirbi-components` | Light recipes for Semtic elements. |
55
+ * | `skirbi-app` | Application overrides. Always comes last. |
56
+ */
38
57
 
39
58
  @layer skirbi-base, skirbi-theme, skirbi-transform, skirbi-components,
40
59
  skirbi-app;
41
60
 
61
+
62
+ /**
63
+ * @styles pinta.skirbi-theme @@skirbi-theme
64
+ * @description
65
+ *
66
+ * The `skirbi-theme` cascade layer contains Pinta's default theme contract.
67
+ *
68
+ * This layer is where Pinta defines the default knobs for:
69
+ *
70
+ * - foreground helpers
71
+ * - color families
72
+ * - background transforms
73
+ * - page and surface sources
74
+ * - motion
75
+ * - typography
76
+ * - terminal accents
77
+ * - button recipes
78
+ * - status colors
79
+ * - dark-mode defaults
80
+ *
81
+ * Theme authors should override these values in their own CSS inside the same
82
+ * cascade layer.
83
+ *
84
+ * @codestart css
85
+ * @@layer skirbi-theme {
86
+ * [skirbi-theme="client"] {
87
+ * --skirbi-primary-main: #355c7d;
88
+ * --skirbi-secondary-main: #00c9b5;
89
+ * }
90
+ * }
91
+ * @codeend
92
+ */
93
+
94
+ /**
95
+ * @styles pinta.skirbi-theme-tokens @@skirbi-theme tokens
96
+ * @description
97
+ *
98
+ * Public tokens defined by the `skirbi-theme` cascade layer.
99
+ *
100
+ * These are the knobs theme authors are expected to override first.
101
+ * Derived and final tokens may exist elsewhere, but this page focuses on the
102
+ * defaults provided by the theme layer itself.
103
+ *
104
+ * ## Foreground helpers
105
+ *
106
+ * - `--skirbi-on-dark`
107
+ * - Default: `#ffffff`
108
+ * - Foreground helper for dark surfaces.
109
+ * - `--skirbi-on-light`
110
+ * - Default: `#0f172a`
111
+ * - Foreground helper for light surfaces.
112
+ *
113
+ * ## Color families
114
+ *
115
+ * - `--skirbi-primary-main`
116
+ * - Default: `#0f172a`
117
+ * - Primary brand color.
118
+ * - `--skirbi-primary-soft`
119
+ * - Default: derived from `--skirbi-primary-main`.
120
+ * - Softer primary value.
121
+ * - `--skirbi-primary-strong`
122
+ * - Default: derived from `--skirbi-primary-main`.
123
+ * - Stronger primary value.
124
+ * - `--skirbi-primary-contrast`
125
+ * - Default: `var(--skirbi-on-dark)`.
126
+ * - Foreground used on primary surfaces.
127
+ * - `--skirbi-secondary-main`
128
+ * - Default: `#06b6d4`
129
+ * - Secondary brand or accent color.
130
+ * - `--skirbi-secondary-soft`
131
+ * - Default: derived from `--skirbi-secondary-main`.
132
+ * - Softer secondary value.
133
+ * - `--skirbi-secondary-strong`
134
+ * - Default: derived from `--skirbi-secondary-main`.
135
+ * - Stronger secondary value.
136
+ * - `--skirbi-secondary-contrast`
137
+ * - Default: `var(--skirbi-on-dark)`.
138
+ * - Foreground used on secondary surfaces.
139
+ * - `--skirbi-tertiary-main`
140
+ * - Default: `#f8fafc`
141
+ * - Supporting surface/helper color.
142
+ * - `--skirbi-tertiary-soft`
143
+ * - Default: derived from `--skirbi-tertiary-main`.
144
+ * - Softer tertiary value.
145
+ * - `--skirbi-tertiary-strong`
146
+ * - Default: derived from `--skirbi-tertiary-main`.
147
+ * - Stronger tertiary value.
148
+ * - `--skirbi-tertiary-contrast`
149
+ * - Default: `var(--skirbi-on-light)`.
150
+ * - Foreground used on tertiary surfaces.
151
+ * - `--skirbi-quaternary-main`
152
+ * - Default: `#475569`
153
+ * - Supporting muted/helper color.
154
+ * - `--skirbi-quaternary-soft`
155
+ * - Default: derived from `--skirbi-quaternary-main`.
156
+ * - Softer quaternary value.
157
+ * - `--skirbi-quaternary-strong`
158
+ * - Default: derived from `--skirbi-quaternary-main`.
159
+ * - Stronger quaternary value.
160
+ * - `--skirbi-quaternary-contrast`
161
+ * - Default: `var(--skirbi-on-dark)`.
162
+ * - Foreground used on quaternary surfaces.
163
+ *
164
+ * ## Deprecated aliases
165
+ *
166
+ * These aliases are kept for compatibility. New themes should prefer `soft`
167
+ * and `strong`.
168
+ *
169
+ * - `--skirbi-primary-light`
170
+ * - Alias for `--skirbi-primary-soft`.
171
+ * - `--skirbi-primary-dark`
172
+ * - Alias for `--skirbi-primary-strong`.
173
+ * - `--skirbi-secondary-light`
174
+ * - Alias for `--skirbi-secondary-soft`.
175
+ * - `--skirbi-secondary-dark`
176
+ * - Alias for `--skirbi-secondary-strong`.
177
+ * - `--skirbi-tertiary-light`
178
+ * - Alias for `--skirbi-tertiary-soft`.
179
+ * - `--skirbi-tertiary-dark`
180
+ * - Alias for `--skirbi-tertiary-strong`.
181
+ * - `--skirbi-quaternary-light`
182
+ * - Alias for `--skirbi-quaternary-soft`.
183
+ * - `--skirbi-quaternary-dark`
184
+ * - Alias for `--skirbi-quaternary-strong`.
185
+ *
186
+ * ## Background transforms
187
+ *
188
+ * - `--skirbi-bg-transform`
189
+ * - Default: `wash`.
190
+ * - Background transform mode.
191
+ * - `--skirbi-wash-perc`
192
+ * - Default: `8%`.
193
+ * - Percentage used for calm page washes.
194
+ * - `--skirbi-reverse-wash-perc`
195
+ * - Default: `85%`.
196
+ * - Percentage used for stronger reverse washes.
197
+ * - `--skirbi-bg-transform-perc`
198
+ * - Default: `var(--skirbi-wash-perc)`.
199
+ * - Active transform percentage consumed by the transform layer.
200
+ *
201
+ * ## Environment and canvas
202
+ *
203
+ * - `--skirbi-theme-mode`
204
+ * - Default: `light`.
205
+ * - Current theme mode marker.
206
+ * - `--skirbi-page-bg-source`
207
+ * - Default: `var(--skirbi-primary-main)`.
208
+ * - Source color for the page background derivation.
209
+ * - `--skirbi-page-fg`
210
+ * - Default: `var(--skirbi-on-light)`.
211
+ * - Page foreground color.
212
+ * - `--skirbi-surface-bg-source`
213
+ * - Default: `var(--skirbi-tertiary-main)`.
214
+ * - Source color for surface derivations.
215
+ * - `--skirbi-surface-fg`
216
+ * - Default: `var(--skirbi-on-light)`.
217
+ * - Surface foreground color.
218
+ *
219
+ * ## Surface derivation knobs
220
+ *
221
+ * - `--skirbi-surface-lift`
222
+ * - Default: `8%`.
223
+ * - Amount used to lift surface backgrounds from their source.
224
+ * - `--skirbi-border-lift`
225
+ * - Default: `12%`.
226
+ * - Amount used to derive surface borders.
227
+ * - `--skirbi-muted-lift`
228
+ * - Default: `40%`.
229
+ * - Amount used to derive muted text.
230
+ *
231
+ * ## Motion
232
+ *
233
+ * - `--skirbi-transition-duration`
234
+ * - Default: `180ms`.
235
+ * - Default transition duration.
236
+ * - `--skirbi-transform-duration`
237
+ * - Default: `140ms`.
238
+ * - Default transform transition duration.
239
+ * - `--skirbi-transition-ease`
240
+ * - Default: `cubic-bezier(0.4, 0, 0.2, 1)`.
241
+ * - Default easing curve.
242
+ *
243
+ * ## Typography
244
+ *
245
+ * - `--skirbi-font-sans`
246
+ * - Default: system sans-serif stack.
247
+ * - Default sans font family.
248
+ * - `--skirbi-font-mono`
249
+ * - Default: system monospace stack.
250
+ * - Default monospace font family.
251
+ * - `--skirbi-font-scale`
252
+ * - Default: `1.125`.
253
+ * - Base font scale multiplier.
254
+ * - `--skirbi-line-height`
255
+ * - Default: `1.7`.
256
+ * - Base line-height.
257
+ * - `--skirbi-h1-scale`
258
+ * - Default: `2.5`.
259
+ * - Heading level 1 scale.
260
+ * - `--skirbi-h2-scale`
261
+ * - Default: `1.875`.
262
+ * - Heading level 2 scale.
263
+ * - `--skirbi-h3-scale`
264
+ * - Default: `1.5`.
265
+ * - Heading level 3 scale.
266
+ * - `--skirbi-h4-scale`
267
+ * - Default: `1.25`.
268
+ * - Heading level 4 scale.
269
+ * - `--skirbi-prose-gap`
270
+ * - Default: `1.25rem`.
271
+ * - Default vertical rhythm for prose.
272
+ * - `--skirbi-heading-line-height`
273
+ * - Default: `1.2`.
274
+ * - Heading line-height.
275
+ * - `--skirbi-heading-tracking`
276
+ * - Default: `-0.01em`.
277
+ * - Heading letter spacing.
278
+ *
279
+ * ## Terminal accents
280
+ *
281
+ * - `--skirbi-terminal-dot-close`
282
+ * - Default: `#e27878`.
283
+ * - Close dot color for macOS-style terminals.
284
+ * - `--skirbi-terminal-dot-minimize`
285
+ * - Default: `#e2a478`.
286
+ * - Minimize dot color for macOS-style terminals.
287
+ * - `--skirbi-terminal-dot-maximize`
288
+ * - Default: `#b4be82`.
289
+ * - Maximize dot color for macOS-style terminals.
290
+ *
291
+ * ## Buttons
292
+ *
293
+ * - `--skirbi-button-radius`
294
+ * - Default: `999px`.
295
+ * - Default button radius.
296
+ * - `--skirbi-button-font-family`
297
+ * - Default: `inherit`.
298
+ * - Default button font family.
299
+ * - `--skirbi-button-lead-bg`
300
+ * - Default: `var(--skirbi-primary-main)`.
301
+ * - Lead button background.
302
+ * - `--skirbi-button-lead-color`
303
+ * - Default: `var(--skirbi-primary-contrast)`.
304
+ * - Lead button foreground.
305
+ * - `--skirbi-button-lead-hover-bg`
306
+ * - Default: `var(--skirbi-secondary-main)`.
307
+ * - Lead button hover background.
308
+ * - `--skirbi-button-lead-hover-color`
309
+ * - Default: `var(--skirbi-secondary-contrast)`.
310
+ * - Lead button hover foreground.
311
+ * - `--skirbi-button-support-bg`
312
+ * - Default: `transparent`.
313
+ * - Support button background.
314
+ * - `--skirbi-button-support-color`
315
+ * - Default: `var(--skirbi-primary-main)`.
316
+ * - Support button foreground.
317
+ * - `--skirbi-button-support-border`
318
+ * - Default: `var(--skirbi-primary-main)`.
319
+ * - Support button border.
320
+ * - `--skirbi-button-support-hover-bg`
321
+ * - Default: subtle primary mix.
322
+ * - Support button hover background.
323
+ * - `--skirbi-button-support-hover-color`
324
+ * - Default: `var(--skirbi-primary-main)`.
325
+ * - Support button hover foreground.
326
+ * - `--skirbi-button-extra-bg`
327
+ * - Default: `transparent`.
328
+ * - Extra button background.
329
+ * - `--skirbi-button-extra-color`
330
+ * - Default: `var(--skirbi-primary-main)`.
331
+ * - Extra button foreground.
332
+ * - `--skirbi-button-extra-border`
333
+ * - Default: `var(--skirbi-surface-border-final)`.
334
+ * - Extra button border.
335
+ * - `--skirbi-button-extra-hover-bg`
336
+ * - Default: subtle primary mix.
337
+ * - Extra button hover background.
338
+ * - `--skirbi-button-extra-hover-color`
339
+ * - Default: `var(--skirbi-primary-main)`.
340
+ * - Extra button hover foreground.
341
+ * - `--skirbi-button-extra-hover-border`
342
+ * - Default: `var(--skirbi-primary-main)`.
343
+ * - Extra button hover border.
344
+ * - `--skirbi-button-antagonist-bg`
345
+ * - Default: `transparent`.
346
+ * - Antagonist button background.
347
+ * - `--skirbi-button-antagonist-color`
348
+ * - Default: `var(--skirbi-error-base, #b91c1c)`.
349
+ * - Antagonist button foreground.
350
+ * - `--skirbi-button-antagonist-border`
351
+ * - Default: `var(--skirbi-error-base, #b91c1c)`.
352
+ * - Antagonist button border.
353
+ * - `--skirbi-button-antagonist-hover-bg`
354
+ * - Default: subtle error mix.
355
+ * - Antagonist button hover background.
356
+ * - `--skirbi-button-antagonist-hover-color`
357
+ * - Default: `var(--skirbi-error-base, #b91c1c)`.
358
+ * - Antagonist button hover foreground.
359
+ * - `--skirbi-button-antagonist-strong-bg`
360
+ * - Default: `var(--skirbi-error-base, #b91c1c)`.
361
+ * - Strong antagonist button background.
362
+ * - `--skirbi-button-herald-bg`
363
+ * - Default: `transparent`.
364
+ * - Herald button background.
365
+ * - `--skirbi-button-herald-color`
366
+ * - Default: `var(--skirbi-warn-base, #d97706)`.
367
+ * - Herald button foreground.
368
+ * - `--skirbi-button-herald-border`
369
+ * - Default: `var(--skirbi-warn-base, #d97706)`.
370
+ * - Herald button border.
371
+ * - `--skirbi-button-herald-hover-bg`
372
+ * - Default: subtle warning mix.
373
+ * - Herald button hover background.
374
+ * - `--skirbi-button-herald-hover-color`
375
+ * - Default: `var(--skirbi-warn-base, #d97706)`.
376
+ * - Herald button hover foreground.
377
+ * - `--skirbi-button-herald-strong-bg`
378
+ * - Default: `var(--skirbi-warn-base, #d97706)`.
379
+ * - Strong herald button background.
380
+ *
381
+ * ## Status colors
382
+ *
383
+ * Status colors are semantic, not branding.
384
+ *
385
+ * - `--skirbi-info-base`
386
+ * - Default: `#2f6fed`.
387
+ * - Informational status color.
388
+ * - `--skirbi-success-base`
389
+ * - Default: `#0f766e`.
390
+ * - Success status color.
391
+ * - `--skirbi-warn-base`
392
+ * - Default: `#d97706`.
393
+ * - Warning status color.
394
+ * - `--skirbi-error-base`
395
+ * - Default: `#b91c1c`.
396
+ * - Error status color.
397
+ *
398
+ * ## Dark-mode overrides
399
+ *
400
+ * These values are applied by `[skirbi-theme][skirbi-theme-mode="dark"]`.
401
+ *
402
+ * - `--skirbi-theme-mode`
403
+ * - Dark value: `dark`.
404
+ * - `--skirbi-env-base`
405
+ * - Dark value: `black`.
406
+ * - `--skirbi-page-bg-source`
407
+ * - Dark value: `var(--skirbi-primary-main)`.
408
+ * - `--skirbi-page-fg`
409
+ * - Dark value: `var(--skirbi-primary-contrast)`.
410
+ * - `--skirbi-surface-bg-source`
411
+ * - Dark value: `var(--skirbi-secondary-main)`.
412
+ * - `--skirbi-surface-fg`
413
+ * - Dark value: `var(--skirbi-secondary-contrast)`.
414
+ * - `--skirbi-surface-lift`
415
+ * - Dark value: `12%`.
416
+ * - `--skirbi-border-lift`
417
+ * - Dark value: `18%`.
418
+ */
419
+
42
420
  @layer skirbi-theme {
43
- /**
421
+ /**
422
+ * @styles pinta.theme-defaults Theme defaults
423
+ * @description
424
+ *
425
+ * Default Pinta theme values.
426
+ *
427
+ * Everything in this section is a default for the default theme only.
428
+ * Theme authors should override these values in the `skirbi-theme` cascade layer.
429
+ *
430
+ * ```css
431
+ * @@layer skirbi-theme {
432
+ * [skirbi-theme="client"] {
433
+ * --skirbi-primary-main: #355c7d;
434
+ * --skirbi-secondary-main: #00c9b5;
435
+ * --skirbi-tertiary-main: #ffecb3;
436
+ * --skirbi-quaternary-main: #0b1b3a;
437
+ * }
438
+ * }
439
+ * ```
440
+ */
441
+
442
+ /*
44
443
  * PINTA DEFAULTS (SHOWCASE)
45
444
  *
46
445
  * Everything below is a default for the default theme only.
47
- * Theme authors override these in their own CSS in @layer skirbi-theme.
446
+ * Theme authors override these in their own CSS in the `skirbi-theme` cascade layer.
48
447
  *
49
448
  * Where pinta is the default theme, authors are encouraged to create a
50
449
  * separate theme:
@@ -65,7 +464,48 @@
65
464
  * In your own css file.
66
465
  */
67
466
 
467
+ /**
468
+ * @styles pinta.theme-activation Theme activation
469
+ * @description
470
+ *
471
+ * Pinta is explicit opt-in.
472
+ *
473
+ * Nothing happens unless `[skirbi-theme]` exists.
474
+ *
475
+ * Examples:
476
+ *
477
+ * - Whole page: `html` with `skirbi-theme`
478
+ * - Subtree: `section` with `skirbi-theme`
479
+ * - Named theme: `html` with `skirbi-theme="client"`
480
+ *
481
+ * The attribute enables the token engine, transforms, and component recipes
482
+ * for the selected element or subtree.
483
+ */
484
+
68
485
  [skirbi-theme] {
486
+
487
+ /**
488
+ * @styles pinta.color-families Color families
489
+ * @description
490
+ *
491
+ * Pinta uses color families instead of loose palette slots.
492
+ *
493
+ * Theme authors usually only need to override the `*-main` values. Soft,
494
+ * strong, and contrast values are derived from those main colors by default.
495
+ *
496
+ * | Token | Purpose |
497
+ * | --- | --- |
498
+ * | `--skirbi-primary-main` | Primary brand color. |
499
+ * | `--skirbi-primary-soft` | Softer primary value. |
500
+ * | `--skirbi-primary-strong` | Stronger primary value. |
501
+ * | `--skirbi-primary-contrast` | Text color for primary surfaces. |
502
+ * | `--skirbi-secondary-main` | Secondary brand/accent color. |
503
+ * | `--skirbi-tertiary-main` | Supporting surface/helper color. |
504
+ * | `--skirbi-quaternary-main` | Supporting muted/helper color. |
505
+ * | `--skirbi-on-dark` | Foreground helper for dark surfaces. |
506
+ * | `--skirbi-on-light` | Foreground helper for light surfaces. |
507
+ */
508
+
69
509
  /* Foreground helpers */
70
510
  --skirbi-on-dark: #ffffff;
71
511
  --skirbi-on-light: #0f172a;
@@ -110,6 +550,23 @@
110
550
  --skirbi-quaternary-light: var(--skirbi-quaternary-soft);
111
551
  --skirbi-quaternary-dark: var(--skirbi-quaternary-strong);
112
552
 
553
+ /**
554
+ * @styles pinta.background-transforms Background transforms
555
+ * @description
556
+ *
557
+ * Pinta derives atmospheric backgrounds from brand colors.
558
+ *
559
+ * The background transform controls how strongly page colors are mixed with
560
+ * the current environment color.
561
+ *
562
+ * | Token | Purpose |
563
+ * | --- | --- |
564
+ * | `--skirbi-bg-transform` | Transform mode: `none`, `wash`, or `reverse-wash`. |
565
+ * | `--skirbi-wash-perc` | Percentage used for calm page washes. |
566
+ * | `--skirbi-reverse-wash-perc` | Percentage used for stronger reverse washes. |
567
+ * | `--skirbi-bg-transform-perc` | Active transform percentage used by the transform layer. |
568
+ */
569
+
113
570
  /* Background transforms */
114
571
  --skirbi-bg-transform: wash;
115
572
  --skirbi-wash-perc: 8%;
@@ -119,6 +576,27 @@
119
576
  /* Environment knobs */
120
577
  --skirbi-theme-mode: light;
121
578
 
579
+ /**
580
+ * @styles pinta.surface-tokens Page and surface tokens
581
+ * @description
582
+ *
583
+ * Page and surface tokens define the main visual canvas.
584
+ *
585
+ * Source tokens are chosen by the theme. The transform layer derives the
586
+ * final tokens used by recipes and base styling.
587
+ *
588
+ * | Source token | Final token |
589
+ * | --- | --- |
590
+ * | `--skirbi-page-bg-source` | `--skirbi-page-bg-final` |
591
+ * | `--skirbi-surface-bg-source` | `--skirbi-surface-bg-final` |
592
+ * | `--skirbi-surface-bg-source` | `--skirbi-surface-bg-elevated-final` |
593
+ * | `--skirbi-surface-bg-source` | `--skirbi-surface-border-final` |
594
+ * | `--skirbi-page-fg` | `--skirbi-text-muted-final` |
595
+ *
596
+ * Theme authors may override the final tokens directly when derivation is
597
+ * not enough.
598
+ */
599
+
122
600
  /* Page defaults */
123
601
  --skirbi-page-bg-source: var(--skirbi-primary-main);
124
602
  --skirbi-page-fg: var(--skirbi-on-light);
@@ -137,8 +615,30 @@
137
615
  --skirbi-transform-duration: 140ms;
138
616
  --skirbi-transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
139
617
 
618
+ /**
619
+ * @styles pinta.typography Typography tokens
620
+ * @description
621
+ *
622
+ * Typography is token-driven and only applies inside `[skirbi-theme]`.
623
+ *
624
+ * | Token | Purpose |
625
+ * | --- | --- |
626
+ * | `--skirbi-font-sans` | Default sans-serif font stack. |
627
+ * | `--skirbi-font-headers` | The same as font-sans |
628
+ * | `--skirbi-font-mono` | Default monospace font stack. |
629
+ * | `--skirbi-font-scale` | Base font scale multiplier. |
630
+ * | `--skirbi-line-height` | Base line-height. |
631
+ * | `--skirbi-h1-scale` | Heading level 1 scale. |
632
+ * | `--skirbi-h2-scale` | Heading level 2 scale. |
633
+ * | `--skirbi-h3-scale` | Heading level 3 scale. |
634
+ * | `--skirbi-h4-scale` | Heading level 4 scale. |
635
+ * | `--skirbi-prose-gap` | Default block rhythm for prose. |
636
+ * | `--skirbi-heading-line-height` | Heading line-height. |
637
+ * | `--skirbi-heading-tracking` | Heading letter spacing. |
638
+ */
639
+
140
640
  /* Typography knobs */
141
- --skirbi-font-sans: ui-sans-serif, system-ui, -apple-system,
641
+ --skirbi-font-defaults: ui-sans-serif, system-ui, -apple-system,
142
642
  "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji",
143
643
  "Segoe UI Emoji";
144
644
  --skirbi-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco,
@@ -152,6 +652,9 @@
152
652
  --skirbi-prose-gap: 1.25rem;
153
653
  --skirbi-heading-line-height: 1.2;
154
654
  --skirbi-heading-tracking: -0.01em;
655
+ --skirbi-font-sans: var(--skirbi-font-defaults);
656
+ --skirbi-font-headers: var(--skirbi-font-header-defaults);
657
+
155
658
 
156
659
  @media (max-width: 48rem) {
157
660
  --skirbi-font-scale: 1;
@@ -161,11 +664,38 @@
161
664
  --skirbi-h4-scale: 1.1;
162
665
  }
163
666
 
667
+
668
+ /* Triptych layout */
669
+ --skirbi-triptych-content: 110ch;
670
+ --skirbi-triptych-aside: 16rem;
671
+ --skirbi-triptych-gap: clamp(1rem, 2vw, 2rem);
672
+ --skirbi-triptych-edge: clamp(1rem, 3vw, 2rem);
673
+
164
674
  /* Only in use when terminal-style=macos */
165
675
  --skirbi-terminal-dot-close: #e27878;
166
676
  --skirbi-terminal-dot-minimize: #e2a478;
167
677
  --skirbi-terminal-dot-maximize: #b4be82;
168
678
 
679
+ /**
680
+ * @styles pinta.button-tokens Button tokens
681
+ * @description
682
+ *
683
+ * Button tokens style native buttons and semantic button-like anchors.
684
+ *
685
+ * The semantic variants are:
686
+ *
687
+ * | Variant | Purpose |
688
+ * | --- | --- |
689
+ * | `[lead]` | Primary action. |
690
+ * | `[support]` | Secondary/supporting action. |
691
+ * | `[extra]` | Low-emphasis extra action. |
692
+ * | `[antagonist]` | Destructive or dangerous action. |
693
+ * | `[herald]` | Warning or attention action. |
694
+ *
695
+ * Use normal CSS for one-off button composition. Keep these tokens for theme
696
+ * level behavior.
697
+ */
698
+
169
699
  /* Button knobs */
170
700
  --skirbi-button-radius: 999px;
171
701
  --skirbi-button-font-family: inherit;
@@ -207,7 +737,28 @@
207
737
  --skirbi-button-herald-hover-color: var(--skirbi-warn-base, #d97706);
208
738
  --skirbi-button-herald-strong-bg: var(--skirbi-warn-base, #d97706);
209
739
 
210
- /**
740
+ /**
741
+ * @styles pinta.status-colors Status colors
742
+ * @description
743
+ *
744
+ * Status colors are semantic, not branding.
745
+ *
746
+ * They are chosen for readability, contrast, and colorblind resilience.
747
+ * Brand identity belongs in primary, secondary, tertiary, and quaternary
748
+ * families.
749
+ *
750
+ * | Token | Purpose |
751
+ * | --- | --- |
752
+ * | `--skirbi-info-base` | Informational state. |
753
+ * | `--skirbi-success-base` | Success state. |
754
+ * | `--skirbi-warn-base` | Warning state. |
755
+ * | `--skirbi-error-base` | Error/destructive state. |
756
+ *
757
+ * Do not override these casually. If you do, test contrast and colorblind
758
+ * simulations.
759
+ */
760
+
761
+ /*
211
762
  * STATUS COLOR CONTRACT
212
763
  *
213
764
  * Status colors are intentionally opinionated and semantic.
@@ -229,6 +780,20 @@
229
780
  */
230
781
  }
231
782
 
783
+ /**
784
+ * @styles pinta.theme-modes Theme modes
785
+ * @description
786
+ *
787
+ * Theme mode changes the environment base and surface derivation behavior.
788
+ *
789
+ * ```html
790
+ * <html skirbi-theme skirbi-theme-mode="light">
791
+ * <html skirbi-theme skirbi-theme-mode="dark">
792
+ * ```
793
+ *
794
+ * Mode can be applied to the whole page or to a subtree.
795
+ */
796
+
232
797
  [skirbi-theme][skirbi-theme-mode="dark"] {
233
798
  --skirbi-theme-mode: dark;
234
799
  --skirbi-env-base: black;
@@ -242,6 +807,24 @@
242
807
 
243
808
  }
244
809
 
810
+ /**
811
+ * @styles pinta.transform-layer Transform layer
812
+ * @description
813
+ *
814
+ * The transform layer converts source theme values into final tokens.
815
+ *
816
+ * It handles:
817
+ *
818
+ * - environment base selection
819
+ * - background transform modes
820
+ * - page background derivation
821
+ * - surface background derivation
822
+ * - border and muted text derivation
823
+ * - final token fallback chains
824
+ *
825
+ * Most application CSS should consume final tokens, not transformed internals.
826
+ */
827
+
245
828
  @layer skirbi-transform {
246
829
  [skirbi-theme] {
247
830
  /* Environment pointer (mode-aware) */
@@ -311,6 +894,24 @@
311
894
  }
312
895
  }
313
896
 
897
+ /**
898
+ * @styles pinta.base-layer Base layer
899
+ * @description
900
+ *
901
+ * The base layer applies opt-in structural defaults inside `[skirbi-theme]`.
902
+ *
903
+ * It provides:
904
+ *
905
+ * - `box-sizing` defaults
906
+ * - page background and foreground application
907
+ * - heading and prose typography
908
+ * - code block defaults
909
+ * - focus-visible defaults
910
+ * - display defaults for Semtic custom elements
911
+ *
912
+ * These are intentionally light and should be easy to override in normal CSS.
913
+ */
914
+
314
915
  @layer skirbi-base {
315
916
 
316
917
  [skirbi-theme] {
@@ -360,16 +961,8 @@
360
961
  color: var(--skirbi-page-fg, var(--skirbi-on-light, #0f172a));
361
962
 
362
963
  /* Typography application */
363
- font-family: var(
364
- --skirbi-font-sans,
365
- ui-sans-serif,
366
- system-ui,
367
- -apple-system,
368
- "Segoe UI",
369
- Roboto,
370
- Helvetica,
371
- Arial
372
- );
964
+ font-family: var(--skirbi-font-defaults);
965
+
373
966
  font-size: calc(16px * var(--skirbi-font-scale, 1));
374
967
  line-height: var(--skirbi-line-height, 1.55);
375
968
 
@@ -403,6 +996,11 @@
403
996
  font-size: 0.95em;
404
997
  }
405
998
 
999
+
1000
+ :where(h1, h2, h3, h4, h5, h6) {
1001
+ font-family: var(--skirbi-font-headers);
1002
+ }
1003
+
406
1004
  :where(pre) {
407
1005
  padding: 1rem;
408
1006
  border: 1px solid var(--skirbi-surface-border-final);
@@ -451,11 +1049,39 @@
451
1049
  --skirbi-success-base: #0f766e;
452
1050
  --skirbi-warn-base: #d97706;
453
1051
  --skirbi-error-base: #b91c1c;
1052
+
454
1053
  }
455
1054
  }
456
1055
 
1056
+ /**
1057
+ * @styles pinta.component-recipes Component recipes
1058
+ * @description
1059
+ *
1060
+ * The components layer contains light recipes for Semtic elements.
1061
+ *
1062
+ * Recipes are conservative by design. They give the default theme a useful
1063
+ * starting point without becoming a utility framework or layout system.
1064
+ *
1065
+ * Use normal CSS for composition and one-off layout rules.
1066
+ */
1067
+
457
1068
  @layer skirbi-components {
458
1069
 
1070
+ /**
1071
+ * @styles pinta.semtic-panel-tile Semtic panel and tile
1072
+ * @description
1073
+ *
1074
+ * Light surface recipes for `<semtic-panel>` and `<semtic-tile>`.
1075
+ *
1076
+ * They use final surface tokens and remain easy to override:
1077
+ *
1078
+ * ```css
1079
+ * semtic-panel[login-card] {
1080
+ * max-width: 28rem;
1081
+ * }
1082
+ * ```
1083
+ */
1084
+
459
1085
  /* semtic-panel / semtic-tile */
460
1086
  [skirbi-theme] {
461
1087
  :is(semtic-panel, semtic-tile) {
@@ -490,6 +1116,22 @@
490
1116
  }
491
1117
  }
492
1118
 
1119
+ /**
1120
+ * @styles pinta.semtic-grid Semtic grid
1121
+ * @description
1122
+ *
1123
+ * Default recipe for `<semtic-grid>`.
1124
+ *
1125
+ * The grid uses CSS variables for the common 80% case:
1126
+ *
1127
+ * | Token | Purpose |
1128
+ * | --- | --- |
1129
+ * | `--skirbi-grid-gap` | Grid gap. |
1130
+ * | `--skirbi-columns` | Number of equal-width columns. |
1131
+ *
1132
+ * For real layouts, prefer normal CSS selectors or classes.
1133
+ */
1134
+
493
1135
  /* semtic-grid */
494
1136
  [skirbi-theme] {
495
1137
  semtic-grid {
@@ -502,6 +1144,16 @@
502
1144
  }
503
1145
  }
504
1146
 
1147
+ /**
1148
+ * @styles pinta.semtic-flex Semtic flex
1149
+ * @description
1150
+ *
1151
+ * Default recipe for `<semtic-flex>`.
1152
+ *
1153
+ * The component maps Semtic attributes to simple flex variables. Use normal
1154
+ * CSS when the layout becomes page-specific.
1155
+ */
1156
+
505
1157
  /* semtic-flex */
506
1158
  [skirbi-theme] {
507
1159
  semtic-flex {
@@ -529,6 +1181,17 @@
529
1181
  }
530
1182
  }
531
1183
 
1184
+ /**
1185
+ * @styles pinta.semtic-stack Semtic stack
1186
+ * @description
1187
+ *
1188
+ * Default vertical stack recipe for `<semtic-stack>`.
1189
+ *
1190
+ * | Token | Purpose |
1191
+ * | --- | --- |
1192
+ * | `--skirbi-stack-gap` | Gap between stacked children. |
1193
+ */
1194
+
532
1195
  /* semtic-stack */
533
1196
  [skirbi-theme] {
534
1197
  semtic-stack {
@@ -538,6 +1201,15 @@
538
1201
  }
539
1202
  }
540
1203
 
1204
+ /**
1205
+ * @styles pinta.semtic-terminal Semtic terminal
1206
+ * @description
1207
+ *
1208
+ * Default terminal/code block recipe for `<semtic-terminal>`.
1209
+ *
1210
+ * Supported terminal styles are `linux`, `macos`, `windows`, and `none`.
1211
+ */
1212
+
541
1213
  /* semtic-terminal */
542
1214
  [skirbi-theme] {
543
1215
  semtic-terminal {
@@ -716,6 +1388,15 @@
716
1388
  }
717
1389
  }
718
1390
 
1391
+ /**
1392
+ * @styles pinta.semtic-aside Semtic aside
1393
+ * @description
1394
+ *
1395
+ * Default recipe for `<semtic-aside>`.
1396
+ *
1397
+ * Supported rendered variants include `note`, `warning`, `info`, and `tip`.
1398
+ */
1399
+
719
1400
  /* semtic-aside */
720
1401
  [skirbi-theme] {
721
1402
  semtic-aside {
@@ -738,7 +1419,7 @@
738
1419
  font-size: 0.85rem;
739
1420
  font-weight: 600;
740
1421
  letter-spacing: 0.04em;
741
- color: var(--skirbi-env-base);
1422
+ color: var(--skirbi-aside-header-color, var(--skirbi-page-fg));
742
1423
  }
743
1424
 
744
1425
  nav a {
@@ -747,12 +1428,12 @@
747
1428
  gap: 0.4rem;
748
1429
 
749
1430
  &::before {
750
- content: var(--skirbi-menu-item-separator, "›");
1431
+ content: var(--skirbi-aside-menu-item-separator, var(--skirbi-menu-item-separator, "›"));
751
1432
  opacity: 0.7;
752
1433
  }
753
1434
 
754
1435
  &[aria-current="page"] {
755
- color: var(--skirbi-env-base);
1436
+ color: var(--skirbi-aside-current-color, var(--skirbi-page-fg));
756
1437
  font-weight: 600;
757
1438
  }
758
1439
  }
@@ -781,6 +1462,15 @@
781
1462
  }
782
1463
  }
783
1464
 
1465
+ /**
1466
+ * @styles pinta.semtic-breadcrumbs Semtic breadcrumbs
1467
+ * @description
1468
+ *
1469
+ * Default breadcrumb recipe for Semtic breadcrumb markup.
1470
+ *
1471
+ * The recipe keeps the breadcrumb compact, muted, and easy to override.
1472
+ */
1473
+
784
1474
  /* semtic-breadcrumbs */
785
1475
  [skirbi-theme] {
786
1476
  [semtic-breadcrumbs] {
@@ -878,6 +1568,16 @@
878
1568
  }
879
1569
  }
880
1570
 
1571
+ /**
1572
+ * @styles pinta.semtic-table Semtic table
1573
+ * @description
1574
+ *
1575
+ * Default table recipe for `<semtic-table>`.
1576
+ *
1577
+ * Includes light styling for captions, sortable headers, search toolbar,
1578
+ * pagination, loading state, default rows, and zebra rows.
1579
+ */
1580
+
881
1581
  /* semtic-table */
882
1582
  [skirbi-theme] {
883
1583
  semtic-table {
@@ -1007,6 +1707,15 @@
1007
1707
  }
1008
1708
  }
1009
1709
 
1710
+ /**
1711
+ * @styles pinta.semtic-nav Semtic nav
1712
+ * @description
1713
+ *
1714
+ * Default navigation recipe for `<semtic-nav>`.
1715
+ *
1716
+ * Includes brand, links, social navigation, and small-screen wrapping rules.
1717
+ */
1718
+
1010
1719
  /* semtic-nav */
1011
1720
  [skirbi-theme] {
1012
1721
  semtic-nav > nav {
@@ -1055,7 +1764,21 @@
1055
1764
  object-fit: cover;
1056
1765
  }
1057
1766
 
1767
+ @media (max-width: 36rem) {
1768
+ & semtic-nav [semtic-nav-avatar] {
1769
+ aspect-ratio: 1/1;
1770
+ }
1771
+ }
1772
+
1773
+ semtic-nav [semtic-nav-avatar][hero-image='banner'] {
1774
+ width: auto;
1775
+ height: clamp(2rem, 5vw, 4rem);
1776
+ max-height: 12rem;
1777
+ border-radius: 0;
1778
+ }
1779
+
1058
1780
  semtic-nav [semtic-nav-title] {
1781
+ font-family: var(--skirbi-font-headers);
1059
1782
  font-weight: 700;
1060
1783
  font-size: 1rem;
1061
1784
  letter-spacing: -0.01em;
@@ -1205,6 +1928,15 @@
1205
1928
  }
1206
1929
  }
1207
1930
 
1931
+ /**
1932
+ * @styles pinta.semtic-sidenav Semtic sidenav
1933
+ * @description
1934
+ *
1935
+ * Default side navigation recipe for `<semtic-sidenav>`.
1936
+ *
1937
+ * Uses a sticky desktop layout and an off-canvas mobile layout.
1938
+ */
1939
+
1208
1940
  /* semtic-sidenav */
1209
1941
  [skirbi-theme] {
1210
1942
  semtic-sidenav {
@@ -1687,6 +2419,17 @@
1687
2419
  }
1688
2420
  }
1689
2421
 
2422
+ /**
2423
+ * @styles pinta.form-controls Form controls
2424
+ * @description
2425
+ *
2426
+ * Default form-control recipes for Semtic input, select, textarea,
2427
+ * checkbox, radio, and toggle components.
2428
+ *
2429
+ * The recipes cover label position, choice control appearance, focus states,
2430
+ * disabled states, and error display.
2431
+ */
2432
+
1690
2433
  /* Form controls (label-position) */
1691
2434
  [skirbi-theme] {
1692
2435
  semtic-input,
@@ -1838,10 +2581,10 @@
1838
2581
  appearance: none;
1839
2582
  -webkit-appearance: none;
1840
2583
 
1841
- inline-size: var(--skirbi-choice-size, 0.95rem);
1842
- block-size: var(--skirbi-choice-size, 0.95rem);
1843
- min-inline-size: var(--skirbi-choice-size, 0.95rem);
1844
- min-block-size: var(--skirbi-choice-size, 0.95rem);
2584
+ inline-size: var(--skirbi-choice-size, 0.75rem);
2585
+ block-size: var(--skirbi-choice-size, 0.75rem);
2586
+ min-inline-size: var(--skirbi-choice-size, 0.75rem);
2587
+ min-block-size: var(--skirbi-choice-size, 0.75rem);
1845
2588
 
1846
2589
  margin: 0;
1847
2590
  padding: 0;
@@ -1996,6 +2739,15 @@
1996
2739
  }
1997
2740
  }
1998
2741
 
2742
+ /**
2743
+ * @styles pinta.form-error-position Form error positions
2744
+ * @description
2745
+ *
2746
+ * Layout recipes for Semtic form errors.
2747
+ *
2748
+ * Supported positions include `inline`, `bottom`, `top`, `left`, and `right`.
2749
+ */
2750
+
1999
2751
  /* Form controls (label-error-position) */
2000
2752
  [skirbi-theme] {
2001
2753
  semtic-input[label-error-position="inline"][label-position="top"],
@@ -2121,6 +2873,16 @@
2121
2873
  }
2122
2874
  }
2123
2875
 
2876
+ /**
2877
+ * @styles pinta.buttons Buttons
2878
+ * @description
2879
+ *
2880
+ * Default button and button-like anchor recipes.
2881
+ *
2882
+ * Pinta styles native buttons and semantic action attributes such as
2883
+ * `[lead]`, `[support]`, `[extra]`, `[antagonist]`, and `[herald]`.
2884
+ */
2885
+
2124
2886
  /* Buttons */
2125
2887
  [skirbi-theme] {
2126
2888
  a[lead],
@@ -2314,6 +3076,17 @@
2314
3076
  }
2315
3077
  }
2316
3078
 
3079
+ /**
3080
+ * @styles pinta.semtic-divider Semtic divider
3081
+ * @description
3082
+ *
3083
+ * Default recipe for `<semtic-divider>`.
3084
+ *
3085
+ * | Token | Purpose |
3086
+ * | --- | --- |
3087
+ * | `--skirbi-divider-image` | Background image for the divider. |
3088
+ */
3089
+
2317
3090
  /* semtic-divider */
2318
3091
  [skirbi-theme] {
2319
3092
  semtic-divider {
@@ -2400,6 +3173,23 @@
2400
3173
  }
2401
3174
  }
2402
3175
 
3176
+ /**
3177
+ * @styles pinta.semtic-toast Semtic toast
3178
+ * @description
3179
+ *
3180
+ * Default toast recipe for `<semtic-toast>` and rendered toast items.
3181
+ *
3182
+ * | Token | Purpose |
3183
+ * | --- | --- |
3184
+ * | `--skirbi-toast-inset-block-start` | Top inset. |
3185
+ * | `--skirbi-toast-inset-inline` | Inline inset. |
3186
+ * | `--skirbi-toast-z` | Stacking layer. |
3187
+ * | `--skirbi-toast-gap` | Gap between toast items. |
3188
+ * | `--skirbi-toast-width` | Maximum toast item width. |
3189
+ * | `--skirbi-toast-radius` | Toast item radius. |
3190
+ * | `--skirbi-toast-shadow` | Toast item shadow. |
3191
+ */
3192
+
2403
3193
  [skirbi-theme] {
2404
3194
  semtic-toast {
2405
3195
  position: fixed;
@@ -2448,6 +3238,23 @@
2448
3238
  }
2449
3239
  }
2450
3240
 
3241
+ /**
3242
+ * @styles pinta.semtic-modal Semtic modal
3243
+ * @description
3244
+ *
3245
+ * Default modal recipe for `<semtic-modal>` and `<semtic-back-button-modal>`.
3246
+ *
3247
+ * | Token | Purpose |
3248
+ * | --- | --- |
3249
+ * | `--skirbi-modal-max-width` | Maximum modal width. |
3250
+ * | `--skirbi-modal-width` | Modal width. |
3251
+ * | `--skirbi-modal-radius` | Modal radius. |
3252
+ * | `--skirbi-modal-gap` | Modal content gap. |
3253
+ * | `--skirbi-modal-padding` | Modal panel padding. |
3254
+ * | `--skirbi-modal-backdrop` | Dialog backdrop color. |
3255
+ * | `--skirbi-modal-shadow` | Modal panel shadow. |
3256
+ */
3257
+
2451
3258
  [skirbi-theme] {
2452
3259
  semtic-modal,
2453
3260
  semtic-back-button-modal {
@@ -2515,6 +3322,16 @@
2515
3322
  }
2516
3323
  }
2517
3324
 
3325
+ /**
3326
+ * @styles pinta.semtic-choice-card Semtic choice card
3327
+ * @description
3328
+ *
3329
+ * Default recipe for `<semtic-choice-card>`.
3330
+ *
3331
+ * The recipe styles the rendered panel and mirrors selected state styling from
3332
+ * the host element.
3333
+ */
3334
+
2518
3335
  [skirbi-theme] {
2519
3336
  semtic-choice-card,
2520
3337
  semtic-choice-card * {
@@ -2630,6 +3447,16 @@
2630
3447
 
2631
3448
  }
2632
3449
 
3450
+ /**
3451
+ * @styles pinta.semtic-steps Semtic steps
3452
+ * @description
3453
+ *
3454
+ * Default recipe for `<semtic-steps>`.
3455
+ *
3456
+ * The recipe styles step indicators, connecting lines, active state, and
3457
+ * completed state.
3458
+ */
3459
+
2633
3460
  [skirbi-theme] {
2634
3461
  semtic-steps {
2635
3462
  --step-dot: 2rem;
@@ -2747,4 +3574,316 @@
2747
3574
  }
2748
3575
  }
2749
3576
  }
3577
+
3578
+ /**
3579
+ * @styles pinta.semtic-article-card Semtic article card
3580
+ * @description
3581
+ *
3582
+ * Default recipe for `<semtic-article-card>`, its rendered content hooks,
3583
+ * hero presentation, and restrained card heading scale.
3584
+ */
3585
+
3586
+ [skirbi-theme] {
3587
+ semtic-article-card {
3588
+ display: grid;
3589
+ min-inline-size: 0;
3590
+ margin-block: 1rem;
3591
+
3592
+ > [semtic-article-card-link] {
3593
+ display: grid;
3594
+ gap: 0.75rem;
3595
+ align-content: start;
3596
+ block-size: 100%;
3597
+ box-sizing: border-box;
3598
+ padding: 1.5rem;
3599
+ background: color-mix(
3600
+ in srgb,
3601
+ var(--skirbi-primary-main) 8%,
3602
+ white
3603
+ );
3604
+ border: 2px solid var(--skirbi-primary-main);
3605
+ border-radius: 0.75rem;
3606
+ box-shadow: 0 4px 16px rgb(0 0 0 / 0.12);
3607
+ color: var(--skirbi-primary-dark);
3608
+ text-decoration: none;
3609
+ }
3610
+
3611
+ [semtic-article-card-header],
3612
+ [semtic-article-card-content] {
3613
+ display: grid;
3614
+ gap: 0.75rem;
3615
+ }
3616
+
3617
+ [semtic-article-card-eyebrow] {
3618
+ display: flex;
3619
+ flex-wrap: wrap;
3620
+ gap: 0.5rem;
3621
+ align-items: center;
3622
+ }
3623
+
3624
+ [semtic-article-card-title] {
3625
+ margin: 0;
3626
+ }
3627
+
3628
+ [semtic-article-card-author],
3629
+ [semtic-article-card-date] {
3630
+ font-size: 0.875em;
3631
+ }
3632
+
3633
+ [semtic-article-card-image] {
3634
+ inline-size: 100%;
3635
+ max-block-size: 24rem;
3636
+ object-fit: cover;
3637
+ border-radius: 0.5rem;
3638
+ }
3639
+
3640
+ &[hero] {
3641
+ > [semtic-article-card-link] {
3642
+ padding: 0;
3643
+ overflow: hidden;
3644
+ }
3645
+
3646
+ [semtic-article-card-content] {
3647
+ display: contents;
3648
+ }
3649
+
3650
+ [semtic-article-card-header],
3651
+ [semtic-article-card-content] > :not([semtic-article-card-image]) {
3652
+ margin-inline: 1.5rem;
3653
+ }
3654
+
3655
+ [semtic-article-card-header] {
3656
+ margin-block-start: 1.5rem;
3657
+ }
3658
+
3659
+ [semtic-article-card-content] > :last-child {
3660
+ margin-block-end: 1.5rem;
3661
+ }
3662
+
3663
+ [semtic-article-card-image] {
3664
+ order: -1;
3665
+ border-radius: 0;
3666
+ }
3667
+ }
3668
+
3669
+ h1 {
3670
+ font-size: clamp(1.5rem, 2vw, 2rem);
3671
+ }
3672
+
3673
+ h2 {
3674
+ font-size: clamp(1.35rem, 1.8vw, 1.75rem);
3675
+ }
3676
+
3677
+ h3 {
3678
+ font-size: clamp(1.2rem, 1.6vw, 1.5rem);
3679
+ }
3680
+
3681
+ h4 {
3682
+ font-size: clamp(1.1rem, 1.4vw, 1.3rem);
3683
+ }
3684
+
3685
+ h5 {
3686
+ font-size: clamp(1rem, 1.2vw, 1.15rem);
3687
+ }
3688
+
3689
+ h6 {
3690
+ font-size: clamp(0.9rem, 1vw, 1rem);
3691
+ }
3692
+
3693
+ :is(h1, h2, h3, h4, h5, h6) {
3694
+ line-height: 1.15;
3695
+ overflow-wrap: anywhere;
3696
+ }
3697
+ }
3698
+
3699
+ semtic-article-summary {
3700
+ display: block;
3701
+ }
3702
+ }
3703
+
3704
+ /**
3705
+ * @styles pinta.semtic-pill-box Semtic pill box
3706
+ * @description
3707
+ *
3708
+ * Default compact pill recipe for `<semtic-pill-box>`, including linked pills.
3709
+ */
3710
+
3711
+ [skirbi-theme] {
3712
+ semtic-pill-box {
3713
+ display: inline-flex;
3714
+ align-items: center;
3715
+ padding: 0.35rem 0.65rem;
3716
+ border-radius: 999px;
3717
+ background: var(--skirbi-primary-main);
3718
+ color: white;
3719
+ }
3720
+
3721
+ semtic-pill-box[url] {
3722
+ padding: 0;
3723
+ }
3724
+
3725
+ semtic-pill-box[url] > [semtic-pill-box] {
3726
+ display: inline-flex;
3727
+ align-items: center;
3728
+ padding: 0.35rem 0.65rem;
3729
+ color: inherit;
3730
+ text-decoration: none;
3731
+ }
3732
+ }
3733
+
3734
+ /**
3735
+ * @styles pinta.semtic-grid-triptych Triptych grid
3736
+ * @description
3737
+ *
3738
+ * Three-region grid primitive with a central content column and two side
3739
+ * columns. On narrow screens the regions stack as content, start, then end.
3740
+ *
3741
+ * | Token | Purpose |
3742
+ * | --- | --- |
3743
+ * | `--skirbi-triptych-content` | Maximum content-column width. |
3744
+ * | `--skirbi-triptych-aside` | Width of each side column. |
3745
+ * | `--skirbi-triptych-gap` | Gap between regions. |
3746
+ * | `--skirbi-triptych-edge` | Minimum viewport edge spacing. |
3747
+ */
3748
+
3749
+ [skirbi-theme] {
3750
+ semtic-grid[triptych] {
3751
+ position: relative;
3752
+ left: 50%;
3753
+ display: grid;
3754
+ grid-template-areas: "start content end";
3755
+ grid-template-columns:
3756
+ minmax(10rem, var(--skirbi-triptych-aside))
3757
+ minmax(0, var(--skirbi-triptych-content))
3758
+ minmax(10rem, var(--skirbi-triptych-aside));
3759
+ gap: var(--skirbi-triptych-gap);
3760
+ align-items: start;
3761
+ inline-size: calc(
3762
+ 100vw -
3763
+ var(--skirbi-triptych-edge) -
3764
+ var(--skirbi-triptych-edge)
3765
+ );
3766
+ max-inline-size: calc(
3767
+ var(--skirbi-triptych-content) +
3768
+ var(--skirbi-triptych-aside) +
3769
+ var(--skirbi-triptych-aside) +
3770
+ var(--skirbi-triptych-gap) +
3771
+ var(--skirbi-triptych-gap)
3772
+ );
3773
+ transform: translateX(-50%);
3774
+
3775
+ > :first-child {
3776
+ grid-area: content;
3777
+ inline-size: 100%;
3778
+ min-inline-size: 0;
3779
+ }
3780
+
3781
+ > :nth-child(2) {
3782
+ grid-area: start;
3783
+ min-inline-size: 0;
3784
+ }
3785
+
3786
+ > :nth-child(3) {
3787
+ grid-area: end;
3788
+ min-inline-size: 0;
3789
+ }
3790
+
3791
+ @media (max-width: 768px) {
3792
+ position: static;
3793
+ grid-template-areas:
3794
+ "content"
3795
+ "start"
3796
+ "end";
3797
+ grid-template-columns: minmax(0, 1fr);
3798
+ inline-size: 100%;
3799
+ max-inline-size: none;
3800
+ transform: none;
3801
+ }
3802
+ }
3803
+ }
3804
+
3805
+ /**
3806
+ * @styles pinta.heading-quote Heading quote
3807
+ * @description
3808
+ *
3809
+ * Tightens a paragraph blockquote immediately following a heading and presents
3810
+ * it as compact italic supporting text.
3811
+ */
3812
+
3813
+ [skirbi-theme] {
3814
+ :is(h1, h2, h3, h4, h5, h6):has(+ blockquote p) {
3815
+ margin-block-end: 0;
3816
+ }
3817
+
3818
+ :is(h1, h2, h3, h4, h5, h6) + blockquote p {
3819
+ margin-block-start: 0;
3820
+ margin-block-end: 0;
3821
+ margin-inline-start: 1.5rem;
3822
+ padding: 0;
3823
+ line-height: 0.75;
3824
+ font-size: 0.8rem;
3825
+ font-style: italic;
3826
+ }
3827
+ }
3828
+
3829
+ /**
3830
+ * @styles pinta.semtic-grid-layout Catalogue grid
3831
+ * @description
3832
+ *
3833
+ * Four-column catalogue grid used when `<semtic-grid>` has a `layout`
3834
+ * attribute. Card-span assignment remains the responsibility of the caller.
3835
+ */
3836
+
3837
+ [skirbi-theme] {
3838
+ semtic-grid[layout] {
3839
+ display: grid;
3840
+ width: min(100%, 72rem);
3841
+ margin-inline: auto;
3842
+ gap: clamp(1rem, 2vw, 1.5rem);
3843
+ grid-template-columns: repeat(4, minmax(0, 1fr));
3844
+ }
3845
+
3846
+ semtic-grid[layout] > semtic-article-card {
3847
+ box-sizing: border-box;
3848
+ min-width: 0;
3849
+ min-height: 10rem;
3850
+ height: auto;
3851
+ aspect-ratio: auto;
3852
+ }
3853
+
3854
+ semtic-grid[layout] [semtic-article-card-link] {
3855
+ box-sizing: border-box;
3856
+ height: 100%;
3857
+ padding: clamp(1rem, 2vw, 1.75rem);
3858
+ }
3859
+
3860
+ @media (max-width: 60rem) {
3861
+ semtic-grid[layout] {
3862
+ grid-template-columns: repeat(2, minmax(0, 1fr));
3863
+ }
3864
+ }
3865
+
3866
+ @media (max-width: 36rem) {
3867
+ semtic-grid[layout] {
3868
+ grid-template-columns: 1fr;
3869
+ }
3870
+
3871
+ semtic-grid[layout] > semtic-article-card {
3872
+ grid-column: 1 / -1;
3873
+ }
3874
+ }
3875
+ }
3876
+
3877
+ /*
3878
+ * Guard against component recipes above that set `display` without
3879
+ * excluding `[hidden]`. Author CSS always beats the UA stylesheet's
3880
+ * `[hidden] { display: none }`, so any unqualified `display` rule
3881
+ * silently defeats the native hidden behavior. This attribute selector
3882
+ * outranks plain element selectors, so it wins regardless of source
3883
+ * order above.
3884
+ */
3885
+ [skirbi-theme] [hidden] {
3886
+ display: none;
3887
+ }
3888
+
2750
3889
  }