@skirbi/pinta 0.0.39 → 0.0.40

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/Changes CHANGED
@@ -1,5 +1,11 @@
1
1
  Revision history for @skirbi/pinta
2
2
 
3
+ 0.0.40 2026-09-16 04:30:30Z
4
+
5
+ * Add default styling for semtic-nav-page/semtic-nav-page-item: previous
6
+ hugs the nav's start edge, next its end edge, each a hoverable blurb
7
+ that gains an inline thumbnail when one is present.
8
+
3
9
  0.0.39 2026-09-15 01:57:23Z
4
10
 
5
11
  * Fix bug for `a` elements for lead, antagonist attributes.
package/README.md CHANGED
@@ -26,6 +26,23 @@ Pinta follows the **80% rule**:
26
26
 
27
27
  Everything is CSS. No runtime. No JS required.
28
28
 
29
+ General-purpose utility attributes were removed in v0.0.12. Use classes or
30
+ meaningful attributes as selector hooks, then let CSS handle spacing, borders,
31
+ shadows, and responsive layout.
32
+
33
+
34
+ # Installation
35
+
36
+ ```sh
37
+ npm install @skirbi/pinta
38
+ ```
39
+
40
+ Import the stylesheet from the package:
41
+
42
+ ```css
43
+ @import "@skirbi/pinta/pinta.css";
44
+ ```
45
+
29
46
 
30
47
  # Philosophy
31
48
 
@@ -104,7 +121,7 @@ Named theme:
104
121
 
105
122
  # Why Skirbi and not Pinta?
106
123
 
107
- The namespace `skirbi-` is chosen over `pinta-` because `@skibri/dibuho` also
124
+ The namespace `skirbi-` is chosen over `pinta-` because `@skirbi/dibuho` also
108
125
  paints the canvas and is part of the skirbi-universe. Having one namespace
109
126
  makes things easier.
110
127
 
@@ -114,15 +131,15 @@ makes things easier.
114
131
  Pinta defines stable layer order:
115
132
 
116
133
  ```css
117
- @layer skirbi-base, skirbi-theme, skirbi-transform, skirbi-components, skirbi-app;
134
+ @layer skirbi-base, skirbi-theme, skirbi-transform, skirbi-components,
135
+ skirbi-app;
118
136
  ```
119
137
 
120
138
  Meaning:
121
139
 
122
140
  * `skirbi-base`
123
141
 
124
- * derivation engine
125
- * environment logic
142
+ * structural defaults
126
143
  * typography
127
144
  * accessibility defaults
128
145
 
@@ -142,7 +159,7 @@ Meaning:
142
159
 
143
160
  * `skirbi-app`
144
161
 
145
- * app-specific overrides, always wins over components
162
+ * application-specific overrides
146
163
 
147
164
  Theme authors should override in:
148
165
 
@@ -153,6 +170,10 @@ Theme authors should override in:
153
170
  }
154
171
  ```
155
172
 
173
+ For normal declarations, later layers take precedence over earlier layers.
174
+ Specificity and source order still resolve competing declarations within a
175
+ layer. Unlayered normal CSS takes precedence over layered normal CSS.
176
+
156
177
 
157
178
  # Theme modes
158
179
 
@@ -166,12 +187,26 @@ Pinta supports:
166
187
  Dark mode changes:
167
188
 
168
189
  * environment base
169
- * surface derivation
170
- * page wash
190
+ * page and surface source colors
191
+ * surface derivation lifts
171
192
  * default foregrounds
172
193
 
173
194
  Mode can be applied to any subtree.
174
195
 
196
+ Pinta provides light/dark switching through `skirbi-theme-mode`. Toggle the
197
+ attribute between `light` and `dark`; Pinta updates the environment, source
198
+ colors, foregrounds, and surface derivations for that subtree.
199
+
200
+ ```js
201
+ const root = document.documentElement;
202
+ const currentMode = root.getAttribute('skirbi-theme-mode');
203
+
204
+ root.setAttribute(
205
+ 'skirbi-theme-mode',
206
+ currentMode === 'dark' ? 'light' : 'dark',
207
+ );
208
+ ```
209
+
175
210
 
176
211
  # Color families
177
212
 
@@ -181,8 +216,8 @@ Pinta uses color families instead of loose palette slots.
181
216
 
182
217
  ```css
183
218
  --skirbi-primary-main
184
- --skirbi-primary-light
185
- --skirbi-primary-dark
219
+ --skirbi-primary-soft
220
+ --skirbi-primary-strong
186
221
  --skirbi-primary-contrast
187
222
  ```
188
223
 
@@ -190,8 +225,8 @@ Pinta uses color families instead of loose palette slots.
190
225
 
191
226
  ```css
192
227
  --skirbi-secondary-main
193
- --skirbi-secondary-light
194
- --skirbi-secondary-dark
228
+ --skirbi-secondary-soft
229
+ --skirbi-secondary-strong
195
230
  --skirbi-secondary-contrast
196
231
  ```
197
232
 
@@ -199,23 +234,35 @@ Usually only `*-main` needs to be set.
199
234
 
200
235
  Pinta derives:
201
236
 
202
- * light
203
- * dark
204
- * contrast
237
+ * soft
238
+ * strong
205
239
 
206
240
  unless explicitly overridden.
207
241
 
208
- ## Helper colors
242
+ Contrast defaults to either `--skirbi-on-dark` or `--skirbi-on-light`. It is a
243
+ selected foreground, not a calculated contrast check, so theme authors must
244
+ verify contrast for their palette.
245
+
246
+ The older `--skirbi-*-light` and `--skirbi-*-dark` properties remain as
247
+ deprecated aliases for `soft` and `strong`.
248
+
249
+ ## Supporting colors
209
250
 
210
251
  Helper colors exist for supporting accents.
211
252
 
212
253
  ```css
213
254
  --skirbi-tertiary-main
255
+ --skirbi-tertiary-soft
256
+ --skirbi-tertiary-strong
257
+ --skirbi-tertiary-contrast
214
258
  --skirbi-quaternary-main
259
+ --skirbi-quaternary-soft
260
+ --skirbi-quaternary-strong
261
+ --skirbi-quaternary-contrast
215
262
  ```
216
263
 
217
- These intentionally do not expose full family contracts. They are currently
218
- included, but unused. Component authors may be able to use them if needed.
264
+ Tertiary and quaternary expose the same complete family contract as primary
265
+ and secondary.
219
266
 
220
267
  # Button tokens
221
268
 
@@ -247,10 +294,10 @@ Pinta derives atmospheric backgrounds from brand colors.
247
294
 
248
295
  ## Transform modes
249
296
 
250
- ```css
251
- --skirbi-bg-transform: none;
252
- --skirbi-bg-transform: wash;
253
- --skirbi-bg-transform: reverse-wash;
297
+ ```html
298
+ <html skirbi-theme skirbi-bg-transform="none">
299
+ <html skirbi-theme skirbi-bg-transform="wash">
300
+ <html skirbi-theme skirbi-bg-transform="reverse-wash">
254
301
  ```
255
302
 
256
303
  ## Wash controls
@@ -264,6 +311,14 @@ Default page backgrounds use a wash transform.
264
311
 
265
312
  This keeps themes calm and readable by default.
266
313
 
314
+ The selector attribute changes the active percentage. Setting only
315
+ `--skirbi-bg-transform` does not switch the transform.
316
+
317
+ For exact backgrounds, set `--skirbi-page-bg`, `--skirbi-surface-bg`, or
318
+ `--skirbi-surface-bg-elevated`. Component and application CSS should consume
319
+ the matching `*-final` tokens so explicit overrides and derived fallbacks both
320
+ work.
321
+
267
322
 
268
323
  # Status colors
269
324
 
@@ -416,6 +471,15 @@ Use normal CSS for:
416
471
 
417
472
  Pinta provides light defaults only.
418
473
 
474
+ The plain recipes expose `--skirbi-columns`, `--skirbi-grid-gap`,
475
+ `--skirbi-flex-gap`, and `--skirbi-stack-gap`. `semtic-flex` retains its
476
+ component-specific `semtic-direction`, `semtic-justify`, `semtic-align`, and
477
+ `semtic-wrap="wrap"` mappings. There is no numbered `semtic-gap` mapping or
478
+ responsive `semtic-columns-*` API.
479
+
480
+ Pinta also provides `semtic-grid[diptych]` and `semtic-grid[triptych]`
481
+ recipes. Their shared layout thresholds are `48rem` and `69rem`.
482
+
419
483
  Example:
420
484
 
421
485
  ````html
@@ -460,17 +524,18 @@ attribute based is up to you as the author.
460
524
 
461
525
  # Documentation source
462
526
 
463
- `pinta.css` is the source of truth for the detailed style documentation.
527
+ `lib/themes/pinta.css` is the source of truth for the detailed style
528
+ documentation.
464
529
 
465
530
  The stylesheet uses DocumentCSS-style comment blocks for the public theme
466
531
  contract:
467
532
 
468
- * `@stylesheet` for the Pinta overview
533
+ * `@page` for the Pinta overview and layer documentation
469
534
  * `@styles` for token groups, cascade layers, transforms, and Semtic recipes
470
535
  * Markdown tables and examples inside the comment body
471
536
 
472
- The README stays the human-facing overview. The generated style guide can use
473
- `pinta.css` directly.
537
+ The README stays the human-facing overview. Generate the detailed style guide
538
+ with `npm run docs`.
474
539
 
475
540
  Example `documentjs.json` shape:
476
541
 
@@ -485,20 +550,13 @@ Example `documentjs.json` shape:
485
550
  }
486
551
  ```
487
552
 
488
- # Optional utilities
553
+ # Removed utilities
489
554
 
490
555
  Pinta v0.0.12 removed built-in utility attributes from the core package.
491
556
 
492
- An optional utility package may exist later for:
493
-
494
- * prototypes
495
- * demos
496
- * quick experiments
497
-
498
557
  Core Pinta intentionally stays focused on:
499
558
 
500
559
  * tokens
501
560
  * derivations
502
561
  * recipes
503
562
  * theming
504
-
package/lib/index.mjs CHANGED
@@ -2,4 +2,4 @@
2
2
  //
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
- const VERSION = "0.0.39";
5
+ const VERSION = "0.0.40";
@@ -4957,6 +4957,85 @@
4957
4957
  }
4958
4958
  }
4959
4959
 
4960
+ /**
4961
+ * @styles pinta.semtic-nav-page Semtic nav page
4962
+ * @description
4963
+ *
4964
+ * Default recipe for `<semtic-nav-page>` and its `<semtic-nav-page-item>`
4965
+ * sides. The previous item hugs the nav's start edge, the next item its end
4966
+ * edge -- edge to edge within whatever column the nav itself sits in (the
4967
+ * article's content column, typically), not the page's outer aside rails.
4968
+ */
4969
+ [skirbi-theme] {
4970
+ semtic-nav-page > nav {
4971
+ display: flex;
4972
+ justify-content: space-between;
4973
+ gap: 1rem;
4974
+ margin-block-start: 2rem;
4975
+ padding-block-start: 1.5rem;
4976
+ border-block-start: 1px solid var(--skirbi-surface-border-final);
4977
+ }
4978
+
4979
+ semtic-nav-page-item {
4980
+ display: block;
4981
+ min-width: 0;
4982
+ flex: 1 1 0;
4983
+
4984
+ &[next] {
4985
+ text-align: end;
4986
+ }
4987
+ }
4988
+
4989
+ semtic-nav-page-item > a {
4990
+ display: flex;
4991
+ align-items: center;
4992
+ gap: 0.75rem;
4993
+ padding: 0.5rem;
4994
+ margin: -0.5rem;
4995
+ border-radius: 0.75rem;
4996
+ color: inherit;
4997
+ text-decoration: none;
4998
+ transition: background var(--skirbi-transition-duration)
4999
+ var(--skirbi-transition-ease);
5000
+
5001
+ &:hover, &:focus-visible {
5002
+ background: var(--skirbi-surface-bg-final);
5003
+ }
5004
+ }
5005
+
5006
+ semtic-nav-page-item[next] > a {
5007
+ flex-direction: row-reverse;
5008
+ }
5009
+
5010
+ [semtic-nav-page-eyebrow] {
5011
+ display: block;
5012
+ font-size: 0.75rem;
5013
+ text-transform: uppercase;
5014
+ letter-spacing: 0.04em;
5015
+ color: var(--skirbi-text-muted-final);
5016
+ }
5017
+
5018
+ [semtic-nav-page-title] {
5019
+ display: block;
5020
+ font-weight: 600;
5021
+ overflow: hidden;
5022
+ text-overflow: ellipsis;
5023
+ white-space: nowrap;
5024
+ }
5025
+
5026
+ [semtic-nav-page-thumb] {
5027
+ flex: none;
5028
+
5029
+ img {
5030
+ display: block;
5031
+ width: 3.5rem;
5032
+ height: 3.5rem;
5033
+ border-radius: 0.5rem;
5034
+ object-fit: cover;
5035
+ }
5036
+ }
5037
+ }
5038
+
4960
5039
  /**
4961
5040
  * @styles pinta.heading-quote Heading quote
4962
5041
  * @description
package/package.json CHANGED
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "sideEffects": false,
34
34
  "type": "module",
35
- "version": "0.0.39"
35
+ "version": "0.0.40"
36
36
  }
Binary file