gp-dimm-city 1.7.0 → 1.7.2

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,45 @@ cut a version that has no `## [X.Y.Z]` heading below.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.7.2] - 2026-10-15
11
+
12
+ No package rule counts a book's rows or blocks any more: a threshold like
13
+ "four blocks or fewer" or "12 rows or more" only holds for the content it was
14
+ measured on, so it belongs in that book's own sheet.
15
+
16
+ ### Removed
17
+
18
+ - **The 1.7.1 long-choose-table rule** (`.dc-section-choose > table:has(> tbody
19
+ > tr:nth-child(12))`). Tables are kept whole again, as in 1.7.0. A book with a
20
+ table taller than the page under its heading lets that one split from its own
21
+ sheet, e.g. `.dc-flaws > table { break-inside: auto; }` for the Field Guide's
22
+ Flaw table.
23
+ - **The panel break rules that counted blocks** (`components/section.css`,
24
+ "Where a panel may break"): a panel of four blocks or fewer kept whole, and a
25
+ panel of five or more keeping its 2nd block with its 3rd and its last block
26
+ with the one above. A panel now splits where the page ends; its heading still
27
+ stays with the block under it, and text still keeps 3 orphans and 3 widows.
28
+ A book that wants the 1.7.1 behaviour copies the three rules into its own
29
+ sheet; the design guide does (`design-guide/styles/guide.css` §7).
30
+
31
+ ### Changed
32
+
33
+ - **A skill card's opening** is written `:first-child, :first-child + *`
34
+ instead of `:nth-child(-n+2)`. Same rule: the flavor line and the block
35
+ after it stay with what follows.
36
+
37
+ ## [1.7.1] - 2026-10-15
38
+
39
+ ### Fixed
40
+
41
+ - **A long table of choices splits between rows.** A table of 12 rows or more
42
+ in a `choose` section (`@flaws`, `@ideals`, `@section choose`) may now break
43
+ between rows; each row is a whole option and the header repeats. At the 10pt
44
+ floor the Field Guide's 19-row Flaw table no longer fit under its heading,
45
+ so the whole table jumped to the next page, left the opening page empty and
46
+ pushed the section's last two lines onto a third page. Shorter tables, and
47
+ tables outside `choose` sections, still stay whole.
48
+
10
49
  ## [1.7.0] - 2026-10-15
11
50
 
12
51
  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.2",
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
 
@@ -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;