buckram 1.9.1 → 1.10.0
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/assets/styles/components/structure/_mixins.scss +20 -20
- package/assets/styles/components/structure/_running-content.scss +18 -18
- package/assets/styles/variables/_elements.scss +1 -1
- package/assets/styles/variables/_structure.scss +8 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.10.0](https://github.com/pressbooks/buckram/compare/v1.9.1...v1.10.0) (2026-05-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* new dynamic parameters ([#415](https://github.com/pressbooks/buckram/issues/415)) ([a71a7ef](https://github.com/pressbooks/buckram/commit/a71a7ef72c29873793d029d6348a5c3113a488b7))
|
|
9
|
+
|
|
3
10
|
## [1.9.1](https://github.com/pressbooks/buckram/compare/v1.9.0...v1.9.1) (2026-04-28)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@each $page-type in
|
|
15
15
|
'front-matter:#{$page-position}' {
|
|
16
16
|
@page #{$page-type} {
|
|
17
|
-
@if $page-position == 'first-
|
|
17
|
+
@if $page-position == '#{$first-page-pseudo}:left' {
|
|
18
18
|
@if if-map-get($content-position, left) {
|
|
19
19
|
@include position(if-map-get($content-position, left)) {
|
|
20
20
|
@if head-or-foot(if-map-get($content-position, left)) == 'head' {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
@include front-matter-page-number;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
} @else if $page-position == 'first-
|
|
29
|
+
} @else if $page-position == '#{$first-page-pseudo}:right' {
|
|
30
30
|
@if if-map-get($content-position, right) {
|
|
31
31
|
@include position(if-map-get($content-position, right)) {
|
|
32
32
|
@if head-or-foot(if-map-get($content-position, right)) == 'head' {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
'chapter:#{$page-position}',
|
|
60
60
|
'back-matter:#{$page-position}' {
|
|
61
61
|
@page #{$page-type} {
|
|
62
|
-
@if $page-position == 'first-
|
|
62
|
+
@if $page-position == '#{$first-page-pseudo}:left' {
|
|
63
63
|
@if if-map-get($content-position, left) {
|
|
64
64
|
@include position(if-map-get($content-position, left)) {
|
|
65
65
|
@if head-or-foot(if-map-get($content-position, left)) == 'head' {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
@include page-number;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
} @else if $page-position == 'first-
|
|
74
|
+
} @else if $page-position == '#{$first-page-pseudo}:right' {
|
|
75
75
|
@if if-map-get($content-position, right) {
|
|
76
76
|
@include position(if-map-get($content-position, right)) {
|
|
77
77
|
@if head-or-foot(if-map-get($content-position, right)) == 'head' {
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
'chapter:#{$page-position}',
|
|
218
218
|
'back-matter:#{$page-position}' {
|
|
219
219
|
@page #{$page-type} {
|
|
220
|
-
@if $page-position == 'first-
|
|
220
|
+
@if $page-position == '#{$first-page-pseudo}:left' {
|
|
221
221
|
@if if-map-get($content-position, left) {
|
|
222
222
|
@include position(if-map-get($content-position, left)) {
|
|
223
223
|
padding-top: $runninghead-padding-top;
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
text-transform: $runninghead-left-text-transform;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
} @else if $page-position == 'first-
|
|
235
|
+
} @else if $page-position == '#{$first-page-pseudo}:right' {
|
|
236
236
|
@if if-map-get($content-position, right) {
|
|
237
237
|
@include position(if-map-get($content-position, right)) {
|
|
238
238
|
padding-top: $runninghead-padding-top;
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
'chapter:#{$page-position}',
|
|
291
291
|
'back-matter:#{$page-position}' {
|
|
292
292
|
@page #{$page-type} {
|
|
293
|
-
@if $page-position == 'first-
|
|
293
|
+
@if $page-position == '#{$first-page-pseudo}:left' {
|
|
294
294
|
@if if-map-get($content-position, left) {
|
|
295
295
|
@include position(if-map-get($content-position, left)) {
|
|
296
296
|
padding-bottom: $runningfoot-padding-bottom;
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
text-transform: $runningfoot-left-text-transform;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
} @else if $page-position == 'first-
|
|
308
|
+
} @else if $page-position == '#{$first-page-pseudo}:right' {
|
|
309
309
|
@if if-map-get($content-position, right) {
|
|
310
310
|
@include position(if-map-get($content-position, right)) {
|
|
311
311
|
padding-bottom: $runningfoot-padding-bottom;
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
@mixin page-structure($page-type, $page-position, $numbering-position, $running-content-position) {
|
|
360
360
|
@if $numbering-position and $running-content-position {
|
|
361
361
|
@if $numbering-position == $running-content-position {
|
|
362
|
-
@if $page-position !=
|
|
362
|
+
@if $page-position != $first-page-pseudo {
|
|
363
363
|
@page #{$page-type}:#{$page-position} {
|
|
364
364
|
@include position($running-content-position) {
|
|
365
365
|
@if $page-position == 'left' {
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
} @else {
|
|
387
|
-
@page #{$page-type}
|
|
387
|
+
@page #{$page-type}:#{$first-page-pseudo}:right {
|
|
388
388
|
@include position(if-map-get($running-content-position, right)) {
|
|
389
389
|
@if if-map-get($running-content-position, right) == '@bottom-left'
|
|
390
390
|
or if-map-get($running-content-position, right) == '@bottom-left-corner'
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
@page #{$page-type}
|
|
399
|
+
@page #{$page-type}:#{$first-page-pseudo}:left {
|
|
400
400
|
@include position(if-map-get($running-content-position, left)) {
|
|
401
401
|
@if if-map-get($running-content-position, left) == '@bottom-right'
|
|
402
402
|
or if-map-get($running-content-position, left) == '@bottom-right-corner'
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
} @else {
|
|
412
|
-
@if $page-position !=
|
|
412
|
+
@if $page-position != $first-page-pseudo {
|
|
413
413
|
@page #{$page-type}:#{$page-position} {
|
|
414
414
|
@include position($running-content-position) {
|
|
415
415
|
@if $page-position == 'left' {
|
|
@@ -429,7 +429,7 @@
|
|
|
429
429
|
|
|
430
430
|
}
|
|
431
431
|
} @else {
|
|
432
|
-
@page #{$page-type}
|
|
432
|
+
@page #{$page-type}:#{$first-page-pseudo}:right {
|
|
433
433
|
@include position(if-map-get($running-content-position, right)) {
|
|
434
434
|
content: if-map-get($right-running-content, $page-type);
|
|
435
435
|
}
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
@page #{$page-type}
|
|
441
|
+
@page #{$page-type}:#{$first-page-pseudo}:left {
|
|
442
442
|
@include position(if-map-get($running-content-position, left)) {
|
|
443
443
|
content: if-map-get($left-running-content, $page-type);
|
|
444
444
|
}
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
}
|
|
451
451
|
} @else {
|
|
452
452
|
@if $numbering-position {
|
|
453
|
-
@if $page-position !=
|
|
453
|
+
@if $page-position != $first-page-pseudo {
|
|
454
454
|
@page #{$page-type}:#{$page-position} {
|
|
455
455
|
@include position($numbering-position) {
|
|
456
456
|
@if $page-position == 'left' {
|
|
@@ -461,13 +461,13 @@
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
} @else {
|
|
464
|
-
@page #{$page-type}
|
|
464
|
+
@page #{$page-type}:#{$first-page-pseudo}:right {
|
|
465
465
|
@include position(if-map-get($numbering-position, right)) {
|
|
466
466
|
content: if-map-get($right-page-number, $page-type);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
@page #{$page-type}
|
|
470
|
+
@page #{$page-type}:#{$first-page-pseudo}:left {
|
|
471
471
|
@include position(if-map-get($numbering-position, left)) {
|
|
472
472
|
content: if-map-get($left-page-number, $page-type);
|
|
473
473
|
}
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
@if $running-content-position {
|
|
479
|
-
@if $page-position !=
|
|
479
|
+
@if $page-position != $first-page-pseudo {
|
|
480
480
|
@page #{$page-type}:#{$page-position} {
|
|
481
481
|
@include position($running-content-position) {
|
|
482
482
|
@if $page-position == 'left' {
|
|
@@ -487,13 +487,13 @@
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
} @else {
|
|
490
|
-
@page #{$page-type}
|
|
490
|
+
@page #{$page-type}:#{$first-page-pseudo}:right {
|
|
491
491
|
@include position(if-map-get($running-content-position, right)) {
|
|
492
492
|
content: if-map-get($right-running-content, $page-type);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
@page #{$page-type}
|
|
496
|
+
@page #{$page-type}:#{$first-page-pseudo}:left {
|
|
497
497
|
@include position(if-map-get($running-content-position, left)) {
|
|
498
498
|
content: if-map-get($left-running-content, $page-type);
|
|
499
499
|
}
|
|
@@ -51,8 +51,8 @@ $right-page-number: (
|
|
|
51
51
|
|
|
52
52
|
// Now we style the appropriate location using our page-numbers mixin.
|
|
53
53
|
|
|
54
|
-
@include page-numbers('first-
|
|
55
|
-
@include page-numbers('first-
|
|
54
|
+
@include page-numbers('#{$first-page-pseudo}:left', convert-position('first', $first-numbering-position));
|
|
55
|
+
@include page-numbers('#{$first-page-pseudo}:right', convert-position('first', $first-numbering-position));
|
|
56
56
|
@include page-numbers('left', convert-position('left', $numbering-position));
|
|
57
57
|
@include page-numbers('right', convert-position('right', $numbering-position));
|
|
58
58
|
|
|
@@ -62,13 +62,13 @@ $right-page-number: (
|
|
|
62
62
|
// Now we style the appropriate location using our runninghead or runningfoot mixin.
|
|
63
63
|
|
|
64
64
|
@if head-or-foot($running-content-position) == 'head' {
|
|
65
|
-
@include runninghead('first-
|
|
66
|
-
@include runninghead('first-
|
|
65
|
+
@include runninghead('#{$first-page-pseudo}:left', convert-position('first', $first-running-content-position));
|
|
66
|
+
@include runninghead('#{$first-page-pseudo}:right', convert-position('first', $first-running-content-position));
|
|
67
67
|
@include runninghead('left', convert-position('left', $running-content-position));
|
|
68
68
|
@include runninghead('right', convert-position('right', $running-content-position));
|
|
69
69
|
} @else if head-or-foot($running-content-position) == 'foot' {
|
|
70
|
-
@include runningfoot('first-
|
|
71
|
-
@include runningfoot('first-
|
|
70
|
+
@include runningfoot('#{$first-page-pseudo}:left', convert-position('first', $first-running-content-position));
|
|
71
|
+
@include runningfoot('#{$first-page-pseudo}:right', convert-position('first', $first-running-content-position));
|
|
72
72
|
@include runningfoot('left', convert-position('left', $running-content-position));
|
|
73
73
|
@include runningfoot('right', convert-position('right', $running-content-position));
|
|
74
74
|
}
|
|
@@ -80,56 +80,56 @@ $right-page-number: (
|
|
|
80
80
|
// depending on section type
|
|
81
81
|
|
|
82
82
|
// Front Matter
|
|
83
|
-
@page front-matter
|
|
83
|
+
@page front-matter:#{$first-page-pseudo} {
|
|
84
84
|
@include blank-head-and-foot;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
@include page-structure('front-matter',
|
|
87
|
+
@include page-structure('front-matter', $first-page-pseudo, convert-position('first', $first-numbering-position), convert-position('first', $first-running-content-position));
|
|
88
88
|
@include page-structure('front-matter', 'left', convert-position('left', $numbering-position), convert-position('left', $running-content-position));
|
|
89
89
|
@include page-structure('front-matter', 'right', convert-position('right', $numbering-position), convert-position('right', $running-content-position));
|
|
90
90
|
|
|
91
91
|
// Introduction
|
|
92
|
-
@page introduction
|
|
92
|
+
@page introduction:#{$first-page-pseudo} {
|
|
93
93
|
@include blank-head-and-foot;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
@include page-structure('introduction',
|
|
96
|
+
@include page-structure('introduction', $first-page-pseudo, convert-position('first', $first-numbering-position), convert-position('first', $first-running-content-position));
|
|
97
97
|
@include page-structure('introduction', 'left', convert-position('left', $numbering-position), convert-position('left', $running-content-position));
|
|
98
98
|
@include page-structure('introduction', 'right', convert-position('right', $numbering-position), convert-position('right', $running-content-position));
|
|
99
99
|
|
|
100
100
|
// Post-introduction
|
|
101
|
-
@page post-introduction
|
|
101
|
+
@page post-introduction:#{$first-page-pseudo} {
|
|
102
102
|
@include blank-head-and-foot;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
@include page-structure('post-introduction',
|
|
105
|
+
@include page-structure('post-introduction', $first-page-pseudo, convert-position('first', $first-numbering-position), convert-position('first', $first-running-content-position));
|
|
106
106
|
@include page-structure('post-introduction', 'left', convert-position('left', $numbering-position), convert-position('left', $running-content-position));
|
|
107
107
|
@include page-structure('post-introduction', 'right', convert-position('right', $numbering-position), convert-position('right', $running-content-position));
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
// Parts
|
|
111
|
-
@page part
|
|
111
|
+
@page part:#{$first-page-pseudo} {
|
|
112
112
|
@include blank-head-and-foot;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
@include page-structure('part',
|
|
115
|
+
@include page-structure('part', $first-page-pseudo, convert-position('first', $first-numbering-position), convert-position('first', $first-running-content-position));
|
|
116
116
|
@include page-structure('part', 'left', convert-position('left', $numbering-position), convert-position('left', $running-content-position));
|
|
117
117
|
@include page-structure('part', 'right', convert-position('right', $numbering-position), convert-position('right', $running-content-position));
|
|
118
118
|
|
|
119
119
|
// Chapters
|
|
120
|
-
@page chapter
|
|
120
|
+
@page chapter:#{$first-page-pseudo} {
|
|
121
121
|
@include blank-head-and-foot;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
@include page-structure('chapter',
|
|
124
|
+
@include page-structure('chapter', $first-page-pseudo, convert-position('first', $first-numbering-position), convert-position('first', $first-running-content-position));
|
|
125
125
|
@include page-structure('chapter', 'left', convert-position('left', $numbering-position), convert-position('left', $running-content-position));
|
|
126
126
|
@include page-structure('chapter', 'right', convert-position('right', $numbering-position), convert-position('right', $running-content-position));
|
|
127
127
|
|
|
128
128
|
// Back Matter
|
|
129
|
-
@page back-matter
|
|
129
|
+
@page back-matter:#{$first-page-pseudo} {
|
|
130
130
|
@include blank-head-and-foot;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
@include page-structure('back-matter',
|
|
133
|
+
@include page-structure('back-matter', $first-page-pseudo, convert-position('first', $first-numbering-position), convert-position('first', $first-running-content-position));
|
|
134
134
|
@include page-structure('back-matter', 'left', convert-position('left', $numbering-position), convert-position('left', $running-content-position));
|
|
135
135
|
@include page-structure('back-matter', 'right', convert-position('right', $numbering-position), convert-position('right', $running-content-position));
|
|
@@ -760,7 +760,7 @@ $blockquote-border-left-color: initial !default;
|
|
|
760
760
|
/// are repeated on each page fragment. Prince 16+ defaults to `slice` per CSS spec.
|
|
761
761
|
/// @type String
|
|
762
762
|
/// @since 1.9.0
|
|
763
|
-
$box-decoration-break:
|
|
763
|
+
$box-decoration-break: slice !default;
|
|
764
764
|
|
|
765
765
|
/// Top margin for `<ol>` elements.
|
|
766
766
|
/// @type String | Map
|
|
@@ -58,6 +58,14 @@ $first-running-content-position: null !default;
|
|
|
58
58
|
// $first-running-content-position: 'bottom-outside' !default;
|
|
59
59
|
// TODO: Handle other positions based on recto-verso
|
|
60
60
|
|
|
61
|
+
/// Page pseudo-class used for the first page of each section group.
|
|
62
|
+
/// Prince 16+ uses 'first-of-group', Prince 15 and earlier use 'first'.
|
|
63
|
+
/// Set to 'first' to restore Prince 15 behavior where the first page
|
|
64
|
+
/// of each named page group was matched by :first.
|
|
65
|
+
/// @type String
|
|
66
|
+
/// @since 1.10.0
|
|
67
|
+
$first-page-pseudo: 'first-of-group' !default;
|
|
68
|
+
|
|
61
69
|
// Finally, for the running separator, it either exists or it doesn't,
|
|
62
70
|
// so choose between two options (null, or defined content):
|
|
63
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buckram",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Opinionated SCSS components for books (web, EPUB and PDF).",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "composer install && composer test",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
true,
|
|
46
46
|
{
|
|
47
47
|
"ignorePseudoClasses": [
|
|
48
|
-
"first-of-group"
|
|
48
|
+
"first-of-group",
|
|
49
|
+
"first"
|
|
49
50
|
]
|
|
50
51
|
}
|
|
51
52
|
]
|