@skirbi/pinta 0.0.35 → 0.0.37
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 +60 -0
- package/lib/index.mjs +1 -1
- package/lib/themes/pinta.css +159 -27
- package/package.json +1 -1
package/Changes
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
Revision history for @skirbi/pinta
|
|
2
2
|
|
|
3
|
+
0.0.37 2026-09-09 18:24:01Z
|
|
4
|
+
|
|
5
|
+
* A heading right after a semtic-terminal block, or a semtic-terminal
|
|
6
|
+
block right after a heading, gets its usual top spacing back instead
|
|
7
|
+
of sitting flush against the other.
|
|
8
|
+
|
|
9
|
+
* The first paragraph after a heading inside semtic-article is indented
|
|
10
|
+
2ch, so a heading reads as a section break rather than just another
|
|
11
|
+
line of prose.
|
|
12
|
+
|
|
13
|
+
* --skirbi-triptych-content defaults to 158ch (was 110ch), for a wider
|
|
14
|
+
reading column. --skirbi-triptych-aside's default moves from 16rem
|
|
15
|
+
to 10rem. Values are taken from the canary blog that use these values.
|
|
16
|
+
|
|
17
|
+
* The aside column's own hardcoded 10rem floor (minmax(10rem, aside))
|
|
18
|
+
now tracks --skirbi-triptych-aside itself (min(10rem, aside))
|
|
19
|
+
instead of silently winning whenever aside is set smaller than
|
|
20
|
+
10rem.
|
|
21
|
+
|
|
22
|
+
* The shared "tablet" breakpoint moves from 64rem to 69rem, matching a
|
|
23
|
+
real ~1100px layout tier boundary found through testing. Every
|
|
24
|
+
tablet-tier @media rule (semtic-sidenav's off-canvas/sticky
|
|
25
|
+
breakpoints, semtic-nav's horizontal-to-hamburger collapse, which
|
|
26
|
+
was previously its own one-off mobile-tier value of 48rem) moves
|
|
27
|
+
with it. Whether a nav's link list still fits is a function of how
|
|
28
|
+
many/how wide the links are, not of the viewport tier, so a site
|
|
29
|
+
with a longer menu that needs to collapse earlier should override
|
|
30
|
+
that breakpoint itself rather than pinta guessing a number that only
|
|
31
|
+
fits some sites.
|
|
32
|
+
|
|
33
|
+
New --skirbi-breakpoint-mobile (48rem) and --skirbi-breakpoint-tablet
|
|
34
|
+
(69rem) custom properties document the two shared values and let JS
|
|
35
|
+
read them via getComputedStyle; they can't be used inside an @media
|
|
36
|
+
condition itself, so the Breakpoints doc block, these two
|
|
37
|
+
properties, and every @media literal all have to be kept in sync by
|
|
38
|
+
hand.
|
|
39
|
+
|
|
40
|
+
* semtic-grid[triptych] gets a middle tier, between mobile and desktop
|
|
41
|
+
(48rem-69rem): it collapses to a diptych-style two-column layout,
|
|
42
|
+
with start and end stacking tightly in the narrow column beside
|
|
43
|
+
content, instead of stacking all three the way it already did below
|
|
44
|
+
48rem. A narrower row still has room for one aside column beside the
|
|
45
|
+
content, just not two side by side.
|
|
46
|
+
|
|
47
|
+
* semtic-grid[triptych] with a <semtic-empty> in both the start and end
|
|
48
|
+
slots collapses to a single full-width content column (matching
|
|
49
|
+
plain semtic-grid's own single-column recipe).
|
|
50
|
+
|
|
51
|
+
0.0.36 2026-09-09 15:34:20Z
|
|
52
|
+
|
|
53
|
+
* A hero-image="banner" semtic-nav-avatar no longer gets squashed into a
|
|
54
|
+
tiny square on mobile (the shared avatar aspect-ratio: 1/1 rule caught
|
|
55
|
+
it too) or clipped past its grid column. It keeps its own aspect
|
|
56
|
+
ratio via object-fit: contain, and its semtic-nav-brand is allowed to
|
|
57
|
+
shrink to make room for it.
|
|
58
|
+
|
|
59
|
+
* semtic-nav's mobile hamburger toggle now defaults to the right side of
|
|
60
|
+
the bar, with the brand on the left. hamburger="left" opts back into
|
|
61
|
+
the old default; hamburger="right" is now a no-op kept for compat.
|
|
62
|
+
|
|
3
63
|
0.0.35 2026-09-09 13:39:26Z
|
|
4
64
|
|
|
5
65
|
* The shared semtic-nav-item/-group link recipe no longer hardcodes
|
package/lib/index.mjs
CHANGED
package/lib/themes/pinta.css
CHANGED
|
@@ -69,8 +69,14 @@
|
|
|
69
69
|
* | Tier | Range | `max-width` to use |
|
|
70
70
|
* | --- | --- | --- |
|
|
71
71
|
* | mobile | up to 48rem (768px) | `48rem` |
|
|
72
|
-
* | tablet | 48rem-
|
|
73
|
-
* | desktop | above
|
|
72
|
+
* | tablet | 48rem-69rem (768-1104px) | `69rem` (as `min-width` for the tablet-and-up half) |
|
|
73
|
+
* | desktop | above 69rem | -- |
|
|
74
|
+
*
|
|
75
|
+
* `--skirbi-breakpoint-mobile` and `--skirbi-breakpoint-tablet` hold these
|
|
76
|
+
* same two values, for documentation and for JS reading them via
|
|
77
|
+
* `getComputedStyle`. A `var()` cannot appear inside an `@media`
|
|
78
|
+
* condition, so every `@media` rule below still repeats the literal value
|
|
79
|
+
* by hand and must be kept in sync with this table and that pair.
|
|
74
80
|
*
|
|
75
81
|
* A component may still have its own finer-grained breakpoint for a
|
|
76
82
|
* detail that isn't a layout tier (`semtic-nav-avatar`'s `36rem`
|
|
@@ -641,6 +647,14 @@
|
|
|
641
647
|
--skirbi-transform-duration: 140ms;
|
|
642
648
|
--skirbi-transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
|
|
643
649
|
|
|
650
|
+
/* Breakpoint tokens, for documentation and JS (getComputedStyle) only.
|
|
651
|
+
* A `var()` cannot be used inside an `@media` condition, so every
|
|
652
|
+
* `@media` rule below still repeats the literal value by hand; keep
|
|
653
|
+
* those literals, this pair, and the Breakpoints table above in sync
|
|
654
|
+
* by hand when either changes. */
|
|
655
|
+
--skirbi-breakpoint-mobile: 48rem;
|
|
656
|
+
--skirbi-breakpoint-tablet: 69rem;
|
|
657
|
+
|
|
644
658
|
/**
|
|
645
659
|
* @styles pinta.typography Typography tokens
|
|
646
660
|
* @description
|
|
@@ -696,8 +710,8 @@
|
|
|
696
710
|
--skirbi-diptych-gap: clamp(1rem, 2vw, 2rem);
|
|
697
711
|
|
|
698
712
|
/* Triptych layout */
|
|
699
|
-
--skirbi-triptych-content:
|
|
700
|
-
--skirbi-triptych-aside:
|
|
713
|
+
--skirbi-triptych-content: 158ch;
|
|
714
|
+
--skirbi-triptych-aside: 10rem;
|
|
701
715
|
--skirbi-triptych-gap: clamp(1rem, 2vw, 2rem);
|
|
702
716
|
--skirbi-triptych-edge: clamp(1rem, 3vw, 2rem);
|
|
703
717
|
|
|
@@ -1369,6 +1383,14 @@
|
|
|
1369
1383
|
display: none;
|
|
1370
1384
|
}
|
|
1371
1385
|
}
|
|
1386
|
+
|
|
1387
|
+
semtic-terminal + :is(h1, h2, h3, h4, h5, h6) {
|
|
1388
|
+
padding-top: 1rem;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
:is(h1, h2, h3, h4, h5, h6) + semtic-terminal {
|
|
1392
|
+
padding-top: 1rem;
|
|
1393
|
+
}
|
|
1372
1394
|
}
|
|
1373
1395
|
|
|
1374
1396
|
/* semtic-link-wrapper / semtic-link-copy */
|
|
@@ -1865,7 +1887,7 @@
|
|
|
1865
1887
|
}
|
|
1866
1888
|
|
|
1867
1889
|
@media (max-width: 36rem) {
|
|
1868
|
-
& semtic-nav [semtic-nav-avatar] {
|
|
1890
|
+
& semtic-nav [semtic-nav-avatar]:not([hero-image='banner']) {
|
|
1869
1891
|
aspect-ratio: 1/1;
|
|
1870
1892
|
}
|
|
1871
1893
|
}
|
|
@@ -1873,10 +1895,17 @@
|
|
|
1873
1895
|
semtic-nav [semtic-nav-avatar][hero-image='banner'] {
|
|
1874
1896
|
width: auto;
|
|
1875
1897
|
height: clamp(2rem, 5vw, 4rem);
|
|
1898
|
+
max-width: 100%;
|
|
1876
1899
|
max-height: 12rem;
|
|
1900
|
+
object-fit: contain;
|
|
1877
1901
|
border-radius: 0;
|
|
1878
1902
|
}
|
|
1879
1903
|
|
|
1904
|
+
semtic-nav:has([semtic-nav-avatar][hero-image='banner']) [semtic-nav-brand] {
|
|
1905
|
+
flex-shrink: 1;
|
|
1906
|
+
min-width: 0;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1880
1909
|
semtic-nav [semtic-nav-title] {
|
|
1881
1910
|
font-family: var(--skirbi-font-headers);
|
|
1882
1911
|
font-weight: 700;
|
|
@@ -1978,25 +2007,31 @@
|
|
|
1978
2007
|
}
|
|
1979
2008
|
}
|
|
1980
2009
|
|
|
1981
|
-
|
|
2010
|
+
/* Reuses the shared tablet breakpoint (69rem), not the mobile one,
|
|
2011
|
+
* since whether the horizontal link list still fits is a function of
|
|
2012
|
+
* how many/how wide the links are, not of the viewport tier as such.
|
|
2013
|
+
* A site whose menu needs to collapse earlier than that (a long menu,
|
|
2014
|
+
* a narrow available width) should override this breakpoint itself
|
|
2015
|
+
* rather than pinta guessing a number that only fits some sites. */
|
|
2016
|
+
@media (max-width: 69rem) {
|
|
1982
2017
|
semtic-nav > nav {
|
|
1983
2018
|
display: grid;
|
|
1984
|
-
grid-template-columns: auto
|
|
2019
|
+
grid-template-columns: 1fr auto;
|
|
1985
2020
|
align-items: center;
|
|
1986
2021
|
}
|
|
1987
2022
|
|
|
1988
|
-
semtic-nav[hamburger="
|
|
1989
|
-
grid-template-columns: 1fr
|
|
2023
|
+
semtic-nav[hamburger="left"] > nav {
|
|
2024
|
+
grid-template-columns: auto 1fr;
|
|
1990
2025
|
}
|
|
1991
2026
|
|
|
1992
2027
|
semtic-nav > nav > [semtic-nav-toggle] {
|
|
1993
2028
|
display: inline-flex;
|
|
1994
|
-
grid-column:
|
|
2029
|
+
grid-column: 2;
|
|
1995
2030
|
grid-row: 1;
|
|
1996
2031
|
}
|
|
1997
2032
|
|
|
1998
|
-
semtic-nav[hamburger="
|
|
1999
|
-
grid-column:
|
|
2033
|
+
semtic-nav[hamburger="left"] > nav > [semtic-nav-toggle] {
|
|
2034
|
+
grid-column: 1;
|
|
2000
2035
|
}
|
|
2001
2036
|
|
|
2002
2037
|
semtic-nav:has(> nav > [semtic-nav-links]:empty) > nav > [semtic-nav-toggle] {
|
|
@@ -2004,12 +2039,12 @@
|
|
|
2004
2039
|
}
|
|
2005
2040
|
|
|
2006
2041
|
semtic-nav > nav > [semtic-nav-brand] {
|
|
2007
|
-
grid-column:
|
|
2042
|
+
grid-column: 1;
|
|
2008
2043
|
grid-row: 1;
|
|
2009
2044
|
}
|
|
2010
2045
|
|
|
2011
|
-
semtic-nav[hamburger="
|
|
2012
|
-
grid-column:
|
|
2046
|
+
semtic-nav[hamburger="left"] > nav > [semtic-nav-brand] {
|
|
2047
|
+
grid-column: 2;
|
|
2013
2048
|
}
|
|
2014
2049
|
|
|
2015
2050
|
semtic-nav > nav > [semtic-nav-links] {
|
|
@@ -2264,7 +2299,7 @@
|
|
|
2264
2299
|
flex: 1;
|
|
2265
2300
|
}
|
|
2266
2301
|
|
|
2267
|
-
@media (max-width:
|
|
2302
|
+
@media (max-width: 69rem) {
|
|
2268
2303
|
position: fixed;
|
|
2269
2304
|
inset: 0;
|
|
2270
2305
|
z-index: 40;
|
|
@@ -2302,7 +2337,7 @@
|
|
|
2302
2337
|
}
|
|
2303
2338
|
}
|
|
2304
2339
|
|
|
2305
|
-
@media (min-width:
|
|
2340
|
+
@media (min-width: 69rem) {
|
|
2306
2341
|
position: sticky;
|
|
2307
2342
|
top: 0;
|
|
2308
2343
|
height: 100vh;
|
|
@@ -2381,6 +2416,10 @@
|
|
|
2381
2416
|
semtic-article {
|
|
2382
2417
|
margin: 2rem auto;
|
|
2383
2418
|
}
|
|
2419
|
+
|
|
2420
|
+
semtic-article :where(h1, h2, h3, h4, h5, h6) + p {
|
|
2421
|
+
text-indent: 2ch;
|
|
2422
|
+
}
|
|
2384
2423
|
}
|
|
2385
2424
|
|
|
2386
2425
|
/* Code blocks */
|
|
@@ -4409,9 +4448,9 @@
|
|
|
4409
4448
|
display: grid;
|
|
4410
4449
|
grid-template-areas: "start content end";
|
|
4411
4450
|
grid-template-columns:
|
|
4412
|
-
minmax(10rem, var(--skirbi-triptych-aside))
|
|
4451
|
+
minmax(min(10rem, var(--skirbi-triptych-aside)), var(--skirbi-triptych-aside))
|
|
4413
4452
|
minmax(0, var(--skirbi-triptych-content))
|
|
4414
|
-
minmax(10rem, var(--skirbi-triptych-aside));
|
|
4453
|
+
minmax(min(10rem, var(--skirbi-triptych-aside)), var(--skirbi-triptych-aside));
|
|
4415
4454
|
gap: var(--skirbi-triptych-gap);
|
|
4416
4455
|
align-items: start;
|
|
4417
4456
|
inline-size: calc(
|
|
@@ -4444,27 +4483,120 @@
|
|
|
4444
4483
|
min-inline-size: 0;
|
|
4445
4484
|
}
|
|
4446
4485
|
|
|
4447
|
-
|
|
4486
|
+
/* Between mobile and desktop, triptych collapses to a diptych-style
|
|
4487
|
+
* two-column layout: start and end stack tightly in the narrow
|
|
4488
|
+
* column, with content beside them, rather than stacking all three.
|
|
4489
|
+
* A narrower row still has room for one aside column beside the
|
|
4490
|
+
* content, just not two side by side.
|
|
4491
|
+
*
|
|
4492
|
+
* This is floats, not grid-template-areas, on purpose. A named area
|
|
4493
|
+
* spanning content across both rows sizes those rows off content's
|
|
4494
|
+
* own height too, since a spanning item's excess is distributed
|
|
4495
|
+
* across every track it spans when they're all `auto`. start and
|
|
4496
|
+
* end ended up rows apart, at content's own height, instead of
|
|
4497
|
+
* hugging each other. Floats size each of start/end off their own
|
|
4498
|
+
* height only, independent of content's, but content has to
|
|
4499
|
+
* float too (to the opposite side), not just carry a margin: a
|
|
4500
|
+
* plain in-flow block still occupies its own full height first,
|
|
4501
|
+
* which pushed the *later-in-DOM* start/end floats below its
|
|
4502
|
+
* bottom edge instead of beside its top. Opposite-side floats
|
|
4503
|
+
* don't clear each other, so content and the start/end column
|
|
4504
|
+
* can coexist side by side. `flow-root`, not plain `block`: with
|
|
4505
|
+
* every child floated, a plain block has no in-flow content left
|
|
4506
|
+
* to size its own height from, so it collapsed to nothing and
|
|
4507
|
+
* whatever came after it overlapped the still-taller floats
|
|
4508
|
+
* instead of sitting below them. */
|
|
4509
|
+
@media (max-width: 69rem) {
|
|
4510
|
+
display: flow-root;
|
|
4448
4511
|
position: static;
|
|
4512
|
+
inline-size: 100%;
|
|
4513
|
+
max-inline-size: none;
|
|
4514
|
+
transform: none;
|
|
4515
|
+
|
|
4516
|
+
> :first-child {
|
|
4517
|
+
float: inline-end;
|
|
4518
|
+
inline-size: calc(
|
|
4519
|
+
100% - var(--skirbi-triptych-aside) - var(--skirbi-triptych-gap)
|
|
4520
|
+
);
|
|
4521
|
+
}
|
|
4522
|
+
|
|
4523
|
+
> :nth-child(2) {
|
|
4524
|
+
float: inline-start;
|
|
4525
|
+
inline-size: var(--skirbi-triptych-aside);
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
> :nth-child(3) {
|
|
4529
|
+
float: inline-start;
|
|
4530
|
+
clear: inline-start;
|
|
4531
|
+
inline-size: var(--skirbi-triptych-aside);
|
|
4532
|
+
margin-block-start: var(--skirbi-triptych-gap);
|
|
4533
|
+
}
|
|
4534
|
+
}
|
|
4535
|
+
|
|
4536
|
+
@media (max-width: 48rem) {
|
|
4537
|
+
display: grid;
|
|
4449
4538
|
grid-template-areas:
|
|
4450
4539
|
"content"
|
|
4451
4540
|
"start"
|
|
4452
4541
|
"end";
|
|
4453
4542
|
grid-template-columns: minmax(0, 1fr);
|
|
4543
|
+
|
|
4544
|
+
> :first-child {
|
|
4545
|
+
float: none;
|
|
4546
|
+
inline-size: 100%;
|
|
4547
|
+
}
|
|
4548
|
+
|
|
4549
|
+
> :nth-child(2),
|
|
4550
|
+
> :nth-child(3) {
|
|
4551
|
+
float: none;
|
|
4552
|
+
clear: none;
|
|
4553
|
+
inline-size: auto;
|
|
4554
|
+
margin-block-start: 0;
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
}
|
|
4558
|
+
}
|
|
4559
|
+
|
|
4560
|
+
/* <semtic-empty> in both aside slots means there is genuinely nothing
|
|
4561
|
+
* to show there, in the tablet tier specifically (48rem-69rem): that's
|
|
4562
|
+
* the tier where a real two-aside layout needs the float/flow-root
|
|
4563
|
+
* machinery above just to make start and end hug each other, which is
|
|
4564
|
+
* pointless work for two placeholders nobody asked to see. Desktop and
|
|
4565
|
+
* mobile keep their own default triptych behavior regardless of what's
|
|
4566
|
+
* in the aside slots. Higher specificity than the tablet tier rule
|
|
4567
|
+
* above (two :has() clauses), not !important, so it wins there without
|
|
4568
|
+
* fighting it. */
|
|
4569
|
+
[skirbi-theme] {
|
|
4570
|
+
@media (min-width: 48rem) and (max-width: 69rem) {
|
|
4571
|
+
semtic-grid[triptych]:has(> :nth-child(2):is(semtic-empty)):has(> :nth-child(3):is(semtic-empty)) {
|
|
4572
|
+
display: grid;
|
|
4573
|
+
grid-template-areas: "content";
|
|
4574
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4575
|
+
gap: var(--skirbi-grid-gap, 1rem);
|
|
4576
|
+
position: static;
|
|
4454
4577
|
inline-size: 100%;
|
|
4455
4578
|
max-inline-size: none;
|
|
4456
4579
|
transform: none;
|
|
4580
|
+
|
|
4581
|
+
> :first-child {
|
|
4582
|
+
inline-size: 100%;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
> :nth-child(2),
|
|
4586
|
+
> :nth-child(3) {
|
|
4587
|
+
display: none;
|
|
4588
|
+
}
|
|
4457
4589
|
}
|
|
4458
4590
|
}
|
|
4459
4591
|
}
|
|
4460
4592
|
|
|
4461
4593
|
/* A <semtic-sidenav> used as a diptych/triptych aside is laid out by
|
|
4462
|
-
* that grid, not by its own off-canvas drawer recipe
|
|
4594
|
+
* that grid, not by its own off-canvas drawer recipe. That recipe
|
|
4463
4595
|
* hides it behind position: fixed + a translated-off-screen <nav>
|
|
4464
|
-
* below
|
|
4596
|
+
* below 69rem with nothing here to ever add [semtic-sidenav-open], so
|
|
4465
4597
|
* without this override it simply vanishes well before either grid's
|
|
4466
4598
|
* own stacking breakpoint even engages. Scoped to these two grids'
|
|
4467
|
-
* aside slots specifically, not semtic-sidenav generally
|
|
4599
|
+
* aside slots specifically, not semtic-sidenav generally. A
|
|
4468
4600
|
* standalone sidenav (its usual off-canvas-on-mobile use) keeps its
|
|
4469
4601
|
* own recipe.
|
|
4470
4602
|
*
|
|
@@ -4472,10 +4604,10 @@
|
|
|
4472
4604
|
* 100%, filling the grid track instead: that width is narrower than
|
|
4473
4605
|
* 16rem here (12rem's worth of grid track, see
|
|
4474
4606
|
* override-pinta.css's --skirbi-diptych-aside), and nothing clips the
|
|
4475
|
-
* difference below
|
|
4476
|
-
* column by the difference. Above
|
|
4607
|
+
* difference below 69rem, so the nav visibly spilled into the content
|
|
4608
|
+
* column by the difference. Above 69rem the desktop sticky recipe's
|
|
4477
4609
|
* own `overflow-y: auto` happened to mask it too, by the "overflow-x
|
|
4478
|
-
* becomes auto when overflow-y isn't visible" rule
|
|
4610
|
+
* becomes auto when overflow-y isn't visible" rule. Accidental, not
|
|
4479
4611
|
* a fix, and gone the moment overflow-y changes for any other reason. */
|
|
4480
4612
|
[skirbi-theme] {
|
|
4481
4613
|
semtic-grid[diptych] > :nth-child(2):is(semtic-sidenav),
|
|
@@ -4548,7 +4680,7 @@
|
|
|
4548
4680
|
padding: clamp(1rem, 2vw, 1.75rem);
|
|
4549
4681
|
}
|
|
4550
4682
|
|
|
4551
|
-
@media (max-width:
|
|
4683
|
+
@media (max-width: 69rem) {
|
|
4552
4684
|
semtic-grid[layout] {
|
|
4553
4685
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
4554
4686
|
}
|
package/package.json
CHANGED