@skirbi/pinta 0.0.36 → 0.0.38

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,57 @@
1
1
  Revision history for @skirbi/pinta
2
2
 
3
+ 0.0.38 2026-09-12 03:21:26Z
4
+
5
+ * Add attribution CSS
6
+
7
+ 0.0.37 2026-09-09 18:24:01Z
8
+
9
+ * A heading right after a semtic-terminal block, or a semtic-terminal
10
+ block right after a heading, gets its usual top spacing back instead
11
+ of sitting flush against the other.
12
+
13
+ * The first paragraph after a heading inside semtic-article is indented
14
+ 2ch, so a heading reads as a section break rather than just another
15
+ line of prose.
16
+
17
+ * --skirbi-triptych-content defaults to 158ch (was 110ch), for a wider
18
+ reading column. --skirbi-triptych-aside's default moves from 16rem
19
+ to 10rem. Values are taken from the canary blog that use these values.
20
+
21
+ * The aside column's own hardcoded 10rem floor (minmax(10rem, aside))
22
+ now tracks --skirbi-triptych-aside itself (min(10rem, aside))
23
+ instead of silently winning whenever aside is set smaller than
24
+ 10rem.
25
+
26
+ * The shared "tablet" breakpoint moves from 64rem to 69rem, matching a
27
+ real ~1100px layout tier boundary found through testing. Every
28
+ tablet-tier @media rule (semtic-sidenav's off-canvas/sticky
29
+ breakpoints, semtic-nav's horizontal-to-hamburger collapse, which
30
+ was previously its own one-off mobile-tier value of 48rem) moves
31
+ with it. Whether a nav's link list still fits is a function of how
32
+ many/how wide the links are, not of the viewport tier, so a site
33
+ with a longer menu that needs to collapse earlier should override
34
+ that breakpoint itself rather than pinta guessing a number that only
35
+ fits some sites.
36
+
37
+ New --skirbi-breakpoint-mobile (48rem) and --skirbi-breakpoint-tablet
38
+ (69rem) custom properties document the two shared values and let JS
39
+ read them via getComputedStyle; they can't be used inside an @media
40
+ condition itself, so the Breakpoints doc block, these two
41
+ properties, and every @media literal all have to be kept in sync by
42
+ hand.
43
+
44
+ * semtic-grid[triptych] gets a middle tier, between mobile and desktop
45
+ (48rem-69rem): it collapses to a diptych-style two-column layout,
46
+ with start and end stacking tightly in the narrow column beside
47
+ content, instead of stacking all three the way it already did below
48
+ 48rem. A narrower row still has room for one aside column beside the
49
+ content, just not two side by side.
50
+
51
+ * semtic-grid[triptych] with a <semtic-empty> in both the start and end
52
+ slots collapses to a single full-width content column (matching
53
+ plain semtic-grid's own single-column recipe).
54
+
3
55
  0.0.36 2026-09-09 15:34:20Z
4
56
 
5
57
  * A hero-image="banner" semtic-nav-avatar no longer gets squashed into a
package/lib/index.mjs CHANGED
@@ -2,4 +2,4 @@
2
2
  //
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
- const VERSION = "0.0.36";
5
+ const VERSION = "0.0.38";
@@ -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-64rem (768-1024px) | `64rem` (as `min-width` for the tablet-and-up half) |
73
- * | desktop | above 64rem | -- |
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: 110ch;
700
- --skirbi-triptych-aside: 16rem;
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 */
@@ -1585,15 +1607,61 @@
1585
1607
  overflow: hidden;
1586
1608
  }
1587
1609
 
1588
- semtic-article [semtic-article-hero-img] {
1589
- width: 100%;
1590
- height: auto;
1610
+ semtic-header > header {
1611
+ margin-bottom: 1.5rem;
1612
+ }
1613
+ }
1614
+
1615
+ /**
1616
+ * @styles pinta.semtic-image Semtic image
1617
+ * @description
1618
+ *
1619
+ * Default recipe for `<semtic-image>` and its `<semtic-attribution>` caption.
1620
+ *
1621
+ * `<semtic-image>` renders a `<figure>` with the image and, when attribution
1622
+ * is given, a `<figcaption>` credit line underneath.
1623
+ */
1624
+ [skirbi-theme] {
1625
+ semtic-image {
1591
1626
  display: block;
1592
- object-fit: cover;
1627
+
1628
+ figure {
1629
+ margin: 0;
1630
+ overflow: hidden;
1631
+ }
1632
+
1633
+ img {
1634
+ display: block;
1635
+ width: 100%;
1636
+ height: auto;
1637
+ object-fit: cover;
1638
+ }
1639
+
1640
+ figcaption {
1641
+ padding: 0.375rem 0;
1642
+ font-size: 0.8125rem;
1643
+ color: var(--skirbi-text-muted-final);
1644
+ }
1593
1645
  }
1594
1646
 
1595
- semtic-header > header {
1596
- margin-bottom: 1.5rem;
1647
+ semtic-attribution {
1648
+ display: block;
1649
+
1650
+ p {
1651
+ margin: 0;
1652
+ }
1653
+
1654
+ a {
1655
+ color: inherit;
1656
+ text-decoration: underline;
1657
+ text-decoration-color: var(--skirbi-surface-border-final);
1658
+ text-underline-offset: 0.15em;
1659
+
1660
+ &:hover {
1661
+ color: var(--skirbi-primary-main);
1662
+ text-decoration-color: currentColor;
1663
+ }
1664
+ }
1597
1665
  }
1598
1666
  }
1599
1667
 
@@ -1985,7 +2053,13 @@
1985
2053
  }
1986
2054
  }
1987
2055
 
1988
- @media (max-width: 48rem) {
2056
+ /* Reuses the shared tablet breakpoint (69rem), not the mobile one,
2057
+ * since whether the horizontal link list still fits is a function of
2058
+ * how many/how wide the links are, not of the viewport tier as such.
2059
+ * A site whose menu needs to collapse earlier than that (a long menu,
2060
+ * a narrow available width) should override this breakpoint itself
2061
+ * rather than pinta guessing a number that only fits some sites. */
2062
+ @media (max-width: 69rem) {
1989
2063
  semtic-nav > nav {
1990
2064
  display: grid;
1991
2065
  grid-template-columns: 1fr auto;
@@ -2271,7 +2345,7 @@
2271
2345
  flex: 1;
2272
2346
  }
2273
2347
 
2274
- @media (max-width: 64rem) {
2348
+ @media (max-width: 69rem) {
2275
2349
  position: fixed;
2276
2350
  inset: 0;
2277
2351
  z-index: 40;
@@ -2309,7 +2383,7 @@
2309
2383
  }
2310
2384
  }
2311
2385
 
2312
- @media (min-width: 64rem) {
2386
+ @media (min-width: 69rem) {
2313
2387
  position: sticky;
2314
2388
  top: 0;
2315
2389
  height: 100vh;
@@ -2388,6 +2462,10 @@
2388
2462
  semtic-article {
2389
2463
  margin: 2rem auto;
2390
2464
  }
2465
+
2466
+ semtic-article :where(h1, h2, h3, h4, h5, h6) + p {
2467
+ text-indent: 2ch;
2468
+ }
2391
2469
  }
2392
2470
 
2393
2471
  /* Code blocks */
@@ -4416,9 +4494,9 @@
4416
4494
  display: grid;
4417
4495
  grid-template-areas: "start content end";
4418
4496
  grid-template-columns:
4419
- minmax(10rem, var(--skirbi-triptych-aside))
4497
+ minmax(min(10rem, var(--skirbi-triptych-aside)), var(--skirbi-triptych-aside))
4420
4498
  minmax(0, var(--skirbi-triptych-content))
4421
- minmax(10rem, var(--skirbi-triptych-aside));
4499
+ minmax(min(10rem, var(--skirbi-triptych-aside)), var(--skirbi-triptych-aside));
4422
4500
  gap: var(--skirbi-triptych-gap);
4423
4501
  align-items: start;
4424
4502
  inline-size: calc(
@@ -4451,27 +4529,120 @@
4451
4529
  min-inline-size: 0;
4452
4530
  }
4453
4531
 
4454
- @media (max-width: 48rem) {
4532
+ /* Between mobile and desktop, triptych collapses to a diptych-style
4533
+ * two-column layout: start and end stack tightly in the narrow
4534
+ * column, with content beside them, rather than stacking all three.
4535
+ * A narrower row still has room for one aside column beside the
4536
+ * content, just not two side by side.
4537
+ *
4538
+ * This is floats, not grid-template-areas, on purpose. A named area
4539
+ * spanning content across both rows sizes those rows off content's
4540
+ * own height too, since a spanning item's excess is distributed
4541
+ * across every track it spans when they're all `auto`. start and
4542
+ * end ended up rows apart, at content's own height, instead of
4543
+ * hugging each other. Floats size each of start/end off their own
4544
+ * height only, independent of content's, but content has to
4545
+ * float too (to the opposite side), not just carry a margin: a
4546
+ * plain in-flow block still occupies its own full height first,
4547
+ * which pushed the *later-in-DOM* start/end floats below its
4548
+ * bottom edge instead of beside its top. Opposite-side floats
4549
+ * don't clear each other, so content and the start/end column
4550
+ * can coexist side by side. `flow-root`, not plain `block`: with
4551
+ * every child floated, a plain block has no in-flow content left
4552
+ * to size its own height from, so it collapsed to nothing and
4553
+ * whatever came after it overlapped the still-taller floats
4554
+ * instead of sitting below them. */
4555
+ @media (max-width: 69rem) {
4556
+ display: flow-root;
4455
4557
  position: static;
4558
+ inline-size: 100%;
4559
+ max-inline-size: none;
4560
+ transform: none;
4561
+
4562
+ > :first-child {
4563
+ float: inline-end;
4564
+ inline-size: calc(
4565
+ 100% - var(--skirbi-triptych-aside) - var(--skirbi-triptych-gap)
4566
+ );
4567
+ }
4568
+
4569
+ > :nth-child(2) {
4570
+ float: inline-start;
4571
+ inline-size: var(--skirbi-triptych-aside);
4572
+ }
4573
+
4574
+ > :nth-child(3) {
4575
+ float: inline-start;
4576
+ clear: inline-start;
4577
+ inline-size: var(--skirbi-triptych-aside);
4578
+ margin-block-start: var(--skirbi-triptych-gap);
4579
+ }
4580
+ }
4581
+
4582
+ @media (max-width: 48rem) {
4583
+ display: grid;
4456
4584
  grid-template-areas:
4457
4585
  "content"
4458
4586
  "start"
4459
4587
  "end";
4460
4588
  grid-template-columns: minmax(0, 1fr);
4589
+
4590
+ > :first-child {
4591
+ float: none;
4592
+ inline-size: 100%;
4593
+ }
4594
+
4595
+ > :nth-child(2),
4596
+ > :nth-child(3) {
4597
+ float: none;
4598
+ clear: none;
4599
+ inline-size: auto;
4600
+ margin-block-start: 0;
4601
+ }
4602
+ }
4603
+ }
4604
+ }
4605
+
4606
+ /* <semtic-empty> in both aside slots means there is genuinely nothing
4607
+ * to show there, in the tablet tier specifically (48rem-69rem): that's
4608
+ * the tier where a real two-aside layout needs the float/flow-root
4609
+ * machinery above just to make start and end hug each other, which is
4610
+ * pointless work for two placeholders nobody asked to see. Desktop and
4611
+ * mobile keep their own default triptych behavior regardless of what's
4612
+ * in the aside slots. Higher specificity than the tablet tier rule
4613
+ * above (two :has() clauses), not !important, so it wins there without
4614
+ * fighting it. */
4615
+ [skirbi-theme] {
4616
+ @media (min-width: 48rem) and (max-width: 69rem) {
4617
+ semtic-grid[triptych]:has(> :nth-child(2):is(semtic-empty)):has(> :nth-child(3):is(semtic-empty)) {
4618
+ display: grid;
4619
+ grid-template-areas: "content";
4620
+ grid-template-columns: minmax(0, 1fr);
4621
+ gap: var(--skirbi-grid-gap, 1rem);
4622
+ position: static;
4461
4623
  inline-size: 100%;
4462
4624
  max-inline-size: none;
4463
4625
  transform: none;
4626
+
4627
+ > :first-child {
4628
+ inline-size: 100%;
4629
+ }
4630
+
4631
+ > :nth-child(2),
4632
+ > :nth-child(3) {
4633
+ display: none;
4634
+ }
4464
4635
  }
4465
4636
  }
4466
4637
  }
4467
4638
 
4468
4639
  /* A <semtic-sidenav> used as a diptych/triptych aside is laid out by
4469
- * that grid, not by its own off-canvas drawer recipe -- that recipe
4640
+ * that grid, not by its own off-canvas drawer recipe. That recipe
4470
4641
  * hides it behind position: fixed + a translated-off-screen <nav>
4471
- * below 64rem with nothing here to ever add [semtic-sidenav-open], so
4642
+ * below 69rem with nothing here to ever add [semtic-sidenav-open], so
4472
4643
  * without this override it simply vanishes well before either grid's
4473
4644
  * own stacking breakpoint even engages. Scoped to these two grids'
4474
- * aside slots specifically, not semtic-sidenav generally -- a
4645
+ * aside slots specifically, not semtic-sidenav generally. A
4475
4646
  * standalone sidenav (its usual off-canvas-on-mobile use) keeps its
4476
4647
  * own recipe.
4477
4648
  *
@@ -4479,10 +4650,10 @@
4479
4650
  * 100%, filling the grid track instead: that width is narrower than
4480
4651
  * 16rem here (12rem's worth of grid track, see
4481
4652
  * override-pinta.css's --skirbi-diptych-aside), and nothing clips the
4482
- * difference below 64rem, so the nav visibly spilled into the content
4483
- * column by the difference. Above 64rem the desktop sticky recipe's
4653
+ * difference below 69rem, so the nav visibly spilled into the content
4654
+ * column by the difference. Above 69rem the desktop sticky recipe's
4484
4655
  * own `overflow-y: auto` happened to mask it too, by the "overflow-x
4485
- * becomes auto when overflow-y isn't visible" rule -- accidental, not
4656
+ * becomes auto when overflow-y isn't visible" rule. Accidental, not
4486
4657
  * a fix, and gone the moment overflow-y changes for any other reason. */
4487
4658
  [skirbi-theme] {
4488
4659
  semtic-grid[diptych] > :nth-child(2):is(semtic-sidenav),
@@ -4555,7 +4726,7 @@
4555
4726
  padding: clamp(1rem, 2vw, 1.75rem);
4556
4727
  }
4557
4728
 
4558
- @media (max-width: 64rem) {
4729
+ @media (max-width: 69rem) {
4559
4730
  semtic-grid[layout] {
4560
4731
  grid-template-columns: repeat(2, minmax(0, 1fr));
4561
4732
  }
package/package.json CHANGED
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "sideEffects": false,
34
34
  "type": "module",
35
- "version": "0.0.36"
35
+ "version": "0.0.38"
36
36
  }
Binary file