gp-dimm-city 1.4.0 → 1.4.1
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 +15 -0
- package/package.json +1 -1
- package/styles/components/section.css +18 -4
- package/styles/page-templates.css +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ cut a version that has no `## [X.Y.Z]` heading below.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.4.1] - 2026-10-11
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **A splittable section that ends flush at a page foot no longer leaves a
|
|
15
|
+
nearly blank page after it.** When a `.dc-allow-split` section (or an
|
|
16
|
+
`@npc-stat` with `####` entries) filled its last page to the foot, its
|
|
17
|
+
bottom padding, and the card edge and shadow that cover it, moved to the
|
|
18
|
+
next page as a thin strip. The card's bottom edge now takes no layout space
|
|
19
|
+
on those sections: the surface and shadow layers hang below the box into the
|
|
20
|
+
margin, and the margin below grows by the same amount, so nothing after the
|
|
21
|
+
card moves. Sections that cannot split are unchanged. An element with a
|
|
22
|
+
top margin over 12pt (such as `.dc-tape`) directly after a splittable
|
|
23
|
+
section now sits up to one padding closer to it.
|
|
24
|
+
|
|
10
25
|
## [1.4.0] - 2026-10-11
|
|
11
26
|
|
|
12
27
|
One way to set content in columns: Gutterpress core's `@columns N` …
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gp-dimm-city",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
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",
|
|
@@ -8,6 +8,17 @@
|
|
|
8
8
|
::after layers: "" paints, `none` removes the layer
|
|
9
9
|
--dc-section-pad-top/-right/-bottom/-left — padding; the header bar's
|
|
10
10
|
negative margins are derived from them
|
|
11
|
+
--dc-section-edge — how far the card's bottom edge hangs below the box
|
|
12
|
+
instead of sitting in its padding. 0px (the card's
|
|
13
|
+
padding is layout space) except where the section
|
|
14
|
+
may split across pages: there it is the bottom
|
|
15
|
+
padding, so a section that ends flush at a page foot
|
|
16
|
+
has no padding left to spill onto the next page.
|
|
17
|
+
Mechanism: padding-bottom shrinks by the edge, the
|
|
18
|
+
::before/::after layers extend below the box by it,
|
|
19
|
+
and margin-bottom grows by it. A box that paints
|
|
20
|
+
its own surface (background / box-shadow) keeps it
|
|
21
|
+
at 0px.
|
|
11
22
|
A variant or template owns its chrome by setting these on its own rule. */
|
|
12
23
|
.section {
|
|
13
24
|
/* `filter` on this element stops negative-margin heading bars escaping the
|
|
@@ -22,7 +33,8 @@
|
|
|
22
33
|
/* display: flow-root moved to the :where(.section) rule above — the
|
|
23
34
|
float-containment default must sit at zero specificity so core layout
|
|
24
35
|
classes can own `display`. */
|
|
25
|
-
|
|
36
|
+
--dc-section-edge: 0px;
|
|
37
|
+
padding: var(--dc-section-pad-top) var(--dc-section-pad-right) calc(var(--dc-section-pad-bottom) - var(--dc-section-edge)) var(--dc-section-pad-left);
|
|
26
38
|
/* Single-direction margin: bottom only. Consecutive sections collapse to
|
|
27
39
|
the bottom margin gap (12pt). First section after a chevron has no
|
|
28
40
|
top gap → flush attachment without an adjacency rule.
|
|
@@ -36,7 +48,7 @@
|
|
|
36
48
|
711px against a 708px content box. Giving the decoration room is the
|
|
37
49
|
fix; clipping it back was only ever hiding it. Same shape as
|
|
38
50
|
.dc-path-shell's padding-right. */
|
|
39
|
-
margin: 0 3px 12pt 0;
|
|
51
|
+
margin: 0 3px calc(12pt + var(--dc-section-edge)) 0;
|
|
40
52
|
position: relative;
|
|
41
53
|
/* Sections are atomic units — they MUST NOT span pages. If a section
|
|
42
54
|
does not fit on the remaining page space, it moves to the next page
|
|
@@ -59,6 +71,7 @@
|
|
|
59
71
|
/* It sets the token, not the property, so one declaration above decides. */
|
|
60
72
|
.section.dc-allow-split {
|
|
61
73
|
--dc-section-break-inside: auto;
|
|
74
|
+
--dc-section-edge: var(--dc-section-pad-bottom);
|
|
62
75
|
}
|
|
63
76
|
|
|
64
77
|
/* clip-path + left accent band on ::before.
|
|
@@ -94,7 +107,7 @@
|
|
|
94
107
|
.section::before {
|
|
95
108
|
content: var(--dc-section-surface);
|
|
96
109
|
position: absolute;
|
|
97
|
-
inset: 0;
|
|
110
|
+
inset: 0 0 calc(-1 * var(--dc-section-edge)) 0;
|
|
98
111
|
/* Rail as an inset shadow, not a hard-stop gradient (see .dc-intro). */
|
|
99
112
|
background: var(--dc-section-bg);
|
|
100
113
|
box-shadow: inset 5px 0 0 var(--dc-section-accent);
|
|
@@ -113,7 +126,7 @@
|
|
|
113
126
|
top: 3px;
|
|
114
127
|
left: 3px;
|
|
115
128
|
right: -3px;
|
|
116
|
-
bottom: -3px;
|
|
129
|
+
bottom: calc(-3px - var(--dc-section-edge));
|
|
117
130
|
background: var(--ink-dark);
|
|
118
131
|
clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
|
|
119
132
|
z-index: -2;
|
|
@@ -638,6 +651,7 @@ h3 + .section {
|
|
|
638
651
|
both. */
|
|
639
652
|
.section.dc-npc-stat:is(:has(> h4), :has(> .gp-columns > h4)) {
|
|
640
653
|
--dc-section-break-inside: auto;
|
|
654
|
+
--dc-section-edge: var(--dc-section-pad-bottom);
|
|
641
655
|
}
|
|
642
656
|
.section.dc-npc-stat:has(> h4) > :not(:last-child, :has(+ h4:not(:first-of-type))) {
|
|
643
657
|
break-after: avoid;
|
|
@@ -374,6 +374,7 @@
|
|
|
374
374
|
--dc-section-pad-right: 0.22in;
|
|
375
375
|
--dc-section-pad-bottom: 0.18in;
|
|
376
376
|
--dc-section-pad-left: 0.22in;
|
|
377
|
+
--dc-section-edge: 0px; /* the box paints its own surface: its padding stays inside it (see .section) */
|
|
377
378
|
--gp-column-rule: none; /* the names run in two plain columns, as they always have */
|
|
378
379
|
display: flex;
|
|
379
380
|
flex-direction: column;
|
|
@@ -596,6 +597,7 @@
|
|
|
596
597
|
--dc-section-pad-right: 0.22in;
|
|
597
598
|
--dc-section-pad-bottom: 0.18in;
|
|
598
599
|
--dc-section-pad-left: 0.22in;
|
|
600
|
+
--dc-section-edge: 0px; /* the box paints its own surface: its padding stays inside it (see .section) */
|
|
599
601
|
background: var(--paper-cream);
|
|
600
602
|
box-shadow: inset 4px 0 0 var(--intro-accent), var(--shadow-poster); /* rail: see .dc-intro */
|
|
601
603
|
}
|
|
@@ -615,6 +617,7 @@
|
|
|
615
617
|
var(--dc-chapter-opener-pad-right)
|
|
616
618
|
var(--dc-chapter-opener-pad-top)
|
|
617
619
|
var(--dc-chapter-opener-pad-side);
|
|
620
|
+
--dc-section-edge: 0px; /* explicit padding above; see .section */
|
|
618
621
|
|
|
619
622
|
/* Per-chapter opener tokens flow into the section's accent and surface. */
|
|
620
623
|
--dc-section-accent: var(--dc-chapter-opener-accent);
|