gp-dimm-city 1.7.0 → 1.7.3

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/CHANGELOG.md CHANGED
@@ -7,6 +7,68 @@ cut a version that has no `## [X.Y.Z]` heading below.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.7.3] - 2026-10-15
11
+
12
+ ### Fixed
13
+
14
+ - **A specialty opener's art runs to the bottom edge of the sheet** (#54). The
15
+ image sits in a paragraph wrapper that stayed at its content height, so the
16
+ image's `height: 100%` resolved to nothing and it kept its own aspect ratio,
17
+ and core's in-flow image cap (`max-height: calc(var(--gp-content-h) - 4px)`)
18
+ held it 4px under the page besides. On the Field Guide's 8 openers the art
19
+ stopped 6.36pt (0.04in) short of the 810pt sheet, inside the bleed band, with
20
+ only the plate's dark backdrop under the gap. The wrapper now fills the
21
+ plate and the plate's image drops the cap (the plate is exactly one sheet
22
+ and clips its own overflow), so the art reaches every edge. Gutterpress
23
+ 0.11.20's art safe-area overlay no longer flags those pages.
24
+ - **The release run's tarball tests have a timeout sized for `npm pack`.** The
25
+ first of them runs `npm pack`, which on a busy runner can take longer than
26
+ bun's default 5s test timeout; that failed the 1.7.1 release run before it
27
+ published.
28
+
29
+ ## [1.7.2] - 2026-10-15
30
+
31
+ No package rule counts a book's rows or blocks any more: a threshold like
32
+ "four blocks or fewer" or "12 rows or more" only holds for the content it was
33
+ measured on, so it belongs in that book's own sheet.
34
+
35
+ ### Removed
36
+
37
+ - **The long-choose-table rule from 1.7.1** (`.dc-section-choose > table:has(>
38
+ tbody > tr:nth-child(12))`), which never reached npm. Tables are kept whole,
39
+ as in 1.7.0. A book with a
40
+ table taller than the page under its heading lets that one split from its own
41
+ sheet, e.g. `.dc-flaws > table { break-inside: auto; }` for the Field Guide's
42
+ Flaw table.
43
+ - **The panel break rules that counted blocks** (`components/section.css`,
44
+ "Where a panel may break"): a panel of four blocks or fewer kept whole, and a
45
+ panel of five or more keeping its 2nd block with its 3rd and its last block
46
+ with the one above. A panel now splits where the page ends; its heading still
47
+ stays with the block under it, and text still keeps 3 orphans and 3 widows.
48
+ A book that wants the 1.7.1 behaviour copies the three rules into its own
49
+ sheet; the design guide does (`design-guide/styles/guide.css` §7).
50
+
51
+ ### Changed
52
+
53
+ - **A skill card's opening** is written `:first-child, :first-child + *`
54
+ instead of `:nth-child(-n+2)`. Same rule: the flavor line and the block
55
+ after it stay with what follows.
56
+
57
+ ## [1.7.1] - not released
58
+
59
+ Never published: its release run failed in the test job (the tarball test
60
+ timeout fixed in 1.7.3), and 1.7.2 removed its one change before the next run.
61
+
62
+ ### Fixed
63
+
64
+ - **A long table of choices splits between rows.** A table of 12 rows or more
65
+ in a `choose` section (`@flaws`, `@ideals`, `@section choose`) may now break
66
+ between rows; each row is a whole option and the header repeats. At the 10pt
67
+ floor the Field Guide's 19-row Flaw table no longer fit under its heading,
68
+ so the whole table jumped to the next page, left the opening page empty and
69
+ pushed the section's last two lines onto a third page. Shorter tables, and
70
+ tables outside `choose` sections, still stay whole.
71
+
10
72
  ## [1.7.0] - 2026-10-15
11
73
 
12
74
  A redesign pass by component family. A reader should know what kind of box they
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gp-dimm-city",
3
- "version": "1.7.0",
3
+ "version": "1.7.3",
4
4
  "description": "Dimm City design system for Gutterpress: the markdown-it macros (@skill, @specialty, @learning-path, @callout, …), print stylesheets, design tokens, fonts and page templates the Dimm City TTRPG books are set in.",
5
5
  "type": "module",
6
6
  "main": "plugin.js",
@@ -289,7 +289,8 @@
289
289
  /* A card never opens with just its tab and a line or two at a page foot: its
290
290
  first two blocks (the flavor line and a possibly one-line ability) stay with
291
291
  the first two lines of what follows, or the card moves to the next page. */
292
- .dc-skill-card .dc-card-inner > :nth-child(-n+2) {
292
+ .dc-skill-card .dc-card-inner > :first-child,
293
+ .dc-skill-card .dc-card-inner > :first-child + * {
293
294
  break-after: avoid;
294
295
  }
295
296
 
@@ -430,10 +430,21 @@ hr {
430
430
  background: var(--ink-dark); /* dark fallback so a missing image reads as intentional art plate */
431
431
  }
432
432
 
433
+ /* The image runs to every edge of the sheet (#54). Its paragraph wrapper
434
+ fills the plate too: left at its content height, the image's `height: 100%`
435
+ has nothing to resolve against and the image keeps its own aspect ratio,
436
+ stopping short of the bottom edge. Core caps an in-flow picture 4px under
437
+ the page's content height so it cannot spill onto the next page; the plate
438
+ is exactly one sheet and clips its own overflow, so its image drops the cap. */
439
+ .dc-specialty-art > .dc-img-wrapper {
440
+ height: 100%;
441
+ }
442
+
433
443
  .dc-specialty-art img {
434
444
  display: block;
435
445
  width: 100%;
436
446
  height: 100%;
447
+ max-height: none;
437
448
  object-fit: cover;
438
449
  }
439
450
 
@@ -147,36 +147,14 @@ div[class="section"] {
147
147
  }
148
148
 
149
149
  /* ── Where a panel may break ────────────────────────────────────────────────
150
- A panel is a heading bar and a few blocks. Left alone it splits wherever the
151
- page ends, and the split leaves a heading bar with one line under it at a
152
- page foot, or a two-line tail alone at the top of the next page (the stubs a
153
- reader notices first). Three rules keep the splits clean; none needs a class,
154
- and `.dc-avoid-split` / `--dc-section-break-inside` still win (a book's own
155
- token, a class on the panel).
156
-
157
- 1. A SHORT panel stays whole. Four blocks or fewer (the heading bar counts)
158
- is a third of a page at most, so it moves to the next page rather than
159
- splitting 3 + 1. One with a column run or a table in it is left alone: it
160
- is the tall kind, and keeping it whole leaves the page before it empty.
161
- 2. A LONG panel (five blocks or more) never opens with its heading and a single
162
- block: the second block stays with the third (the heading bar already stays
163
- with the second), so a panel does not start at a page foot with a bar and
164
- one line.
165
- 3. A long panel never ends with one block alone: its last block stays with the
166
- block above it, so a continuation is never a lone paragraph. (Not for a
167
- heading: `break-after: avoid` on headings is core's.)
150
+ A panel splits wherever the page ends; its heading bar stays with the block
151
+ under it (`break-after: avoid` on headings is core's). Which panels a book
152
+ keeps whole depends on how long its panels are, so that is the book's call:
153
+ `.dc-avoid-split` on one panel, or `--dc-section-break-inside: avoid` from
154
+ the book's own sheet.
168
155
  Text in a panel or a callout keeps 3 orphans and 3 widows (the body's are 2): at 2
169
156
  Chromium still splits a three-line paragraph 2 + 1, and the one-line tail opens
170
157
  the next page. At 3 a paragraph of five lines or fewer moves whole. */
171
- .dc-section-panel:not(:has(> :nth-child(5), > .gp-columns, > table)) {
172
- --dc-section-break-inside: avoid;
173
- }
174
- .dc-section-panel:has(> :nth-child(5)) > :nth-child(2) {
175
- break-after: avoid;
176
- }
177
- .dc-section-panel:has(> :nth-child(5)) > :last-child:not(h2, h3, h4) {
178
- break-before: avoid;
179
- }
180
158
  .dc-section-panel :is(p, li),
181
159
  .dc-alert :is(p, li) {
182
160
  orphans: 3;