@skirbi/pinta 0.0.36 → 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 CHANGED
@@ -1,5 +1,53 @@
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
+
3
51
  0.0.36 2026-09-09 15:34:20Z
4
52
 
5
53
  * 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.37";
@@ -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 */
@@ -1985,7 +2007,13 @@
1985
2007
  }
1986
2008
  }
1987
2009
 
1988
- @media (max-width: 48rem) {
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) {
1989
2017
  semtic-nav > nav {
1990
2018
  display: grid;
1991
2019
  grid-template-columns: 1fr auto;
@@ -2271,7 +2299,7 @@
2271
2299
  flex: 1;
2272
2300
  }
2273
2301
 
2274
- @media (max-width: 64rem) {
2302
+ @media (max-width: 69rem) {
2275
2303
  position: fixed;
2276
2304
  inset: 0;
2277
2305
  z-index: 40;
@@ -2309,7 +2337,7 @@
2309
2337
  }
2310
2338
  }
2311
2339
 
2312
- @media (min-width: 64rem) {
2340
+ @media (min-width: 69rem) {
2313
2341
  position: sticky;
2314
2342
  top: 0;
2315
2343
  height: 100vh;
@@ -2388,6 +2416,10 @@
2388
2416
  semtic-article {
2389
2417
  margin: 2rem auto;
2390
2418
  }
2419
+
2420
+ semtic-article :where(h1, h2, h3, h4, h5, h6) + p {
2421
+ text-indent: 2ch;
2422
+ }
2391
2423
  }
2392
2424
 
2393
2425
  /* Code blocks */
@@ -4416,9 +4448,9 @@
4416
4448
  display: grid;
4417
4449
  grid-template-areas: "start content end";
4418
4450
  grid-template-columns:
4419
- minmax(10rem, var(--skirbi-triptych-aside))
4451
+ minmax(min(10rem, var(--skirbi-triptych-aside)), var(--skirbi-triptych-aside))
4420
4452
  minmax(0, var(--skirbi-triptych-content))
4421
- minmax(10rem, var(--skirbi-triptych-aside));
4453
+ minmax(min(10rem, var(--skirbi-triptych-aside)), var(--skirbi-triptych-aside));
4422
4454
  gap: var(--skirbi-triptych-gap);
4423
4455
  align-items: start;
4424
4456
  inline-size: calc(
@@ -4451,27 +4483,120 @@
4451
4483
  min-inline-size: 0;
4452
4484
  }
4453
4485
 
4454
- @media (max-width: 48rem) {
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;
4455
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;
4456
4538
  grid-template-areas:
4457
4539
  "content"
4458
4540
  "start"
4459
4541
  "end";
4460
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;
4461
4577
  inline-size: 100%;
4462
4578
  max-inline-size: none;
4463
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
+ }
4464
4589
  }
4465
4590
  }
4466
4591
  }
4467
4592
 
4468
4593
  /* 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
4594
+ * that grid, not by its own off-canvas drawer recipe. That recipe
4470
4595
  * hides it behind position: fixed + a translated-off-screen <nav>
4471
- * below 64rem with nothing here to ever add [semtic-sidenav-open], so
4596
+ * below 69rem with nothing here to ever add [semtic-sidenav-open], so
4472
4597
  * without this override it simply vanishes well before either grid's
4473
4598
  * own stacking breakpoint even engages. Scoped to these two grids'
4474
- * aside slots specifically, not semtic-sidenav generally -- a
4599
+ * aside slots specifically, not semtic-sidenav generally. A
4475
4600
  * standalone sidenav (its usual off-canvas-on-mobile use) keeps its
4476
4601
  * own recipe.
4477
4602
  *
@@ -4479,10 +4604,10 @@
4479
4604
  * 100%, filling the grid track instead: that width is narrower than
4480
4605
  * 16rem here (12rem's worth of grid track, see
4481
4606
  * 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
4607
+ * difference below 69rem, so the nav visibly spilled into the content
4608
+ * column by the difference. Above 69rem the desktop sticky recipe's
4484
4609
  * 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
4610
+ * becomes auto when overflow-y isn't visible" rule. Accidental, not
4486
4611
  * a fix, and gone the moment overflow-y changes for any other reason. */
4487
4612
  [skirbi-theme] {
4488
4613
  semtic-grid[diptych] > :nth-child(2):is(semtic-sidenav),
@@ -4555,7 +4680,7 @@
4555
4680
  padding: clamp(1rem, 2vw, 1.75rem);
4556
4681
  }
4557
4682
 
4558
- @media (max-width: 64rem) {
4683
+ @media (max-width: 69rem) {
4559
4684
  semtic-grid[layout] {
4560
4685
  grid-template-columns: repeat(2, minmax(0, 1fr));
4561
4686
  }
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.37"
36
36
  }