@skirbi/pinta 0.0.39 → 0.0.41
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 +16 -0
- package/README.md +91 -33
- package/lib/index.mjs +1 -1
- package/lib/themes/pinta.css +116 -0
- package/package.json +1 -1
- package/skirbi-pinta-0.0.39.tgz +0 -0
package/Changes
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
Revision history for @skirbi/pinta
|
|
2
2
|
|
|
3
|
+
0.0.41 2026-09-16 05:32:35Z
|
|
4
|
+
|
|
5
|
+
* semtic-nav-page: fixed the flex recipe to target semtic-nav-page-item
|
|
6
|
+
directly, following the component's own removal of a wrapper div that
|
|
7
|
+
used to sit between them. Default is now a stacked column; the new
|
|
8
|
+
side-by-side attribute switches to the previous two-column,
|
|
9
|
+
edge-to-edge layout. Title truncation now has a real bounded column to
|
|
10
|
+
truncate against. Stacked gap widened to 1rem, side-by-side gap to
|
|
11
|
+
2rem, so hover backgrounds no longer touch in either layout.
|
|
12
|
+
|
|
13
|
+
0.0.40 2026-09-16 04:30:30Z
|
|
14
|
+
|
|
15
|
+
* Add default styling for semtic-nav-page/semtic-nav-page-item: previous
|
|
16
|
+
hugs the nav's start edge, next its end edge, each a hoverable blurb
|
|
17
|
+
that gains an inline thumbnail when one is present.
|
|
18
|
+
|
|
3
19
|
0.0.39 2026-09-15 01:57:23Z
|
|
4
20
|
|
|
5
21
|
* 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 `@
|
|
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,
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
170
|
-
*
|
|
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-
|
|
185
|
-
--skirbi-primary-
|
|
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-
|
|
194
|
-
--skirbi-secondary-
|
|
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
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* contrast
|
|
237
|
+
* soft
|
|
238
|
+
* strong
|
|
205
239
|
|
|
206
240
|
unless explicitly overridden.
|
|
207
241
|
|
|
208
|
-
|
|
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
|
-
|
|
218
|
-
|
|
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
|
-
```
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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
|
|
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
|
-
* `@
|
|
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.
|
|
473
|
-
`
|
|
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
|
-
#
|
|
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
package/lib/themes/pinta.css
CHANGED
|
@@ -4957,6 +4957,122 @@
|
|
|
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, within whatever column the nav itself sits in (the article's
|
|
4966
|
+
* content column, typically), not the page's outer aside rails.
|
|
4967
|
+
*
|
|
4968
|
+
* Stacked by default: previous above next, each a full-width row. The
|
|
4969
|
+
* `side-by-side` attribute lays them out as two columns instead, previous
|
|
4970
|
+
* on the nav's start edge and next on its end edge.
|
|
4971
|
+
*/
|
|
4972
|
+
[skirbi-theme] {
|
|
4973
|
+
semtic-nav-page > nav {
|
|
4974
|
+
display: flex;
|
|
4975
|
+
flex-direction: column;
|
|
4976
|
+
/* >= 2x the item link's own negative margin (0.5rem), so two
|
|
4977
|
+
* stacked items' hover backgrounds never touch or overlap. */
|
|
4978
|
+
gap: 1rem;
|
|
4979
|
+
margin-block-start: 2rem;
|
|
4980
|
+
padding-block-start: 1.5rem;
|
|
4981
|
+
border-block-start: 1px solid var(--skirbi-surface-border-final);
|
|
4982
|
+
|
|
4983
|
+
/* Grid, not flex: a lone item (the first/last page in a section)
|
|
4984
|
+
* must still only occupy its own half -- flex would let a single
|
|
4985
|
+
* flex: 1 1 0 child stretch across the whole row once the other
|
|
4986
|
+
* side is missing. Fixed 1fr/1fr columns hold the halves whether
|
|
4987
|
+
* one or both are present. */
|
|
4988
|
+
&[side-by-side] {
|
|
4989
|
+
display: grid;
|
|
4990
|
+
grid-template-columns: 1fr 1fr;
|
|
4991
|
+
/* Item links expand 0.5rem past their own bounds on hover (the
|
|
4992
|
+
* padding/negative-margin trick above); this must clear both
|
|
4993
|
+
* sides' worth of that or the two hover backgrounds touch. */
|
|
4994
|
+
gap: 2rem;
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
|
|
4998
|
+
semtic-nav-page-item {
|
|
4999
|
+
display: block;
|
|
5000
|
+
min-width: 0;
|
|
5001
|
+
}
|
|
5002
|
+
|
|
5003
|
+
nav[side-by-side] > semtic-nav-page-item[previous] {
|
|
5004
|
+
grid-column: 1;
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
nav[side-by-side] > semtic-nav-page-item[next] {
|
|
5008
|
+
grid-column: 2;
|
|
5009
|
+
text-align: end;
|
|
5010
|
+
}
|
|
5011
|
+
|
|
5012
|
+
semtic-nav-page-item > a {
|
|
5013
|
+
display: flex;
|
|
5014
|
+
align-items: center;
|
|
5015
|
+
min-width: 0;
|
|
5016
|
+
gap: 0.75rem;
|
|
5017
|
+
padding: 0.5rem;
|
|
5018
|
+
margin: -0.5rem;
|
|
5019
|
+
border-radius: 0.75rem;
|
|
5020
|
+
color: inherit;
|
|
5021
|
+
text-decoration: none;
|
|
5022
|
+
transition: background var(--skirbi-transition-duration)
|
|
5023
|
+
var(--skirbi-transition-ease);
|
|
5024
|
+
|
|
5025
|
+
&:hover, &:focus-visible {
|
|
5026
|
+
background: var(--skirbi-surface-bg-final);
|
|
5027
|
+
}
|
|
5028
|
+
}
|
|
5029
|
+
|
|
5030
|
+
nav[side-by-side] > semtic-nav-page-item[next] > a {
|
|
5031
|
+
flex-direction: row-reverse;
|
|
5032
|
+
}
|
|
5033
|
+
|
|
5034
|
+
[semtic-nav-page-text] {
|
|
5035
|
+
display: flex;
|
|
5036
|
+
flex-direction: column;
|
|
5037
|
+
min-width: 0;
|
|
5038
|
+
flex: 1 1 auto;
|
|
5039
|
+
}
|
|
5040
|
+
|
|
5041
|
+
nav[side-by-side] > semtic-nav-page-item[next] [semtic-nav-page-text] {
|
|
5042
|
+
align-items: flex-end;
|
|
5043
|
+
}
|
|
5044
|
+
|
|
5045
|
+
[semtic-nav-page-eyebrow] {
|
|
5046
|
+
display: block;
|
|
5047
|
+
font-size: 0.75rem;
|
|
5048
|
+
text-transform: uppercase;
|
|
5049
|
+
letter-spacing: 0.04em;
|
|
5050
|
+
color: var(--skirbi-text-muted-final);
|
|
5051
|
+
}
|
|
5052
|
+
|
|
5053
|
+
[semtic-nav-page-title] {
|
|
5054
|
+
display: block;
|
|
5055
|
+
min-width: 0;
|
|
5056
|
+
max-width: 100%;
|
|
5057
|
+
font-weight: 600;
|
|
5058
|
+
overflow: hidden;
|
|
5059
|
+
text-overflow: ellipsis;
|
|
5060
|
+
white-space: nowrap;
|
|
5061
|
+
}
|
|
5062
|
+
|
|
5063
|
+
[semtic-nav-page-thumb] {
|
|
5064
|
+
flex: none;
|
|
5065
|
+
|
|
5066
|
+
img {
|
|
5067
|
+
display: block;
|
|
5068
|
+
width: 3.5rem;
|
|
5069
|
+
height: 3.5rem;
|
|
5070
|
+
border-radius: 0.5rem;
|
|
5071
|
+
object-fit: cover;
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
5074
|
+
}
|
|
5075
|
+
|
|
4960
5076
|
/**
|
|
4961
5077
|
* @styles pinta.heading-quote Heading quote
|
|
4962
5078
|
* @description
|
package/package.json
CHANGED
package/skirbi-pinta-0.0.39.tgz
DELETED
|
Binary file
|