buckram 1.6.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/.nvmrc +1 -0
- package/CHANGELOG.md +23 -0
- package/{LICENSE.md → LICENSE} +0 -0
- package/README.md +24 -1
- package/assets/styles/buckram.scss +1 -1
- package/assets/styles/components/_colors.scss +8 -8
- package/assets/styles/components/pages/_back-matter.scss +6 -0
- package/assets/styles/components/pages/_chapters.scss +10 -0
- package/assets/styles/components/pages/_front-matter.scss +6 -0
- package/assets/styles/components/pages/_titles.scss +23 -14
- package/assets/styles/components/section-titles/_back-matter.scss +14 -11
- package/assets/styles/components/section-titles/_chapters.scss +22 -16
- package/assets/styles/components/section-titles/_front-matter.scss +14 -11
- package/assets/styles/components/section-titles/_parts.scss +2 -2
- package/assets/styles/components/specials/_textboxes.scss +15 -3
- package/assets/styles/components/toc/_generic.scss +6 -12
- package/assets/styles/variables/_pages.scss +38 -38
- package/package.json +8 -10
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
14
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.7.2](https://github.com/pressbooks/buckram/compare/1.7.1...v1.7.2) (2022-08-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* don't publish .github to NPM ([c272287](https://github.com/pressbooks/buckram/commit/c27228756ed6066252451986c2be8cc4b6aa73db))
|
|
9
|
+
|
|
10
|
+
## 1.7.1 (2022-08-11)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* resolve issues with extending compound selectors ([#275](https://github.com/pressbooks/buckram/issues/275)) ([4b2f2bb](https://github.com/pressbooks/buckram/commit/4b2f2bb938402981220fb75fe25b81aef17dcdeb))
|
|
15
|
+
|
|
16
|
+
## 1.7.0
|
|
17
|
+
### Minor changes
|
|
18
|
+
- Update semantic selectors to match Pressbooks changes [#887](https://github.com/pressbooks/pressbooks-book/pull/887/files)
|
|
19
|
+
|
|
20
|
+
### Dependencies
|
|
21
|
+
- Bump puppeteer to 11.0.0 [#890](https://github.com/pressbooks/pressbooks-book/pull/890)
|
|
22
|
+
- Bump mocha to 9.1.3 [#882](https://github.com/pressbooks/pressbooks-book/pull/882)
|
|
23
|
+
- Bump nth-check to 2.0.1 [#893](https://github.com/pressbooks/pressbooks-book/pull/893)
|
|
24
|
+
|
|
2
25
|
## 1.6.0
|
|
3
26
|
### Minor changes
|
|
4
27
|
- Add variables for new contributor feature
|
package/{LICENSE.md → LICENSE}
RENAMED
|
File without changes
|
package/README.md
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
# Buckram
|
|
2
2
|
|
|
3
|
-
[](https://github.com/pressbooks/buckram/blob/main/LICENSE) [](https://github.com/pressbooks/buckram/actions) [](https://www.npmjs.com/package/buckram)
|
|
4
4
|
|
|
5
5
|
Opinionated SCSS components for books (web, EPUB and PDF).
|
|
6
6
|
|
|
7
7
|
[Read the docs.](https://buckram.pressbooks.org/)
|
|
8
|
+
|
|
9
|
+
## Testing
|
|
10
|
+
|
|
11
|
+
Install dependencies:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install
|
|
15
|
+
composer install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Run tests:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm test
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Releasing
|
|
25
|
+
|
|
26
|
+
[release-please](https://github.com/googleapis/release-please) will generate release notes in a PR automatically based on commits to `dev`.
|
|
27
|
+
|
|
28
|
+
Merging the PR to tag a new GitHub release and update [CHANGELOG.md](CHANGELOG.md).
|
|
29
|
+
|
|
30
|
+
Then, run `npm publish`.
|
|
@@ -125,7 +125,7 @@ p.wp-caption-text {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
// TITLE PAGE(S) COLOR
|
|
128
|
-
#half-title-page >
|
|
128
|
+
#half-title-page > .title {
|
|
129
129
|
color: if-map-get($half-title-title-color, $type);
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -150,7 +150,7 @@ p.wp-caption-text {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// FRONT MATTER COLOR
|
|
153
|
-
|
|
153
|
+
.front-matter-title {
|
|
154
154
|
color: if-map-get($front-matter-title-color, $type);
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -167,11 +167,11 @@ h1.front-matter-title {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
// PART TITLE COLOR
|
|
170
|
-
|
|
170
|
+
.part-number {
|
|
171
171
|
color: if-map-get($part-number-color, $type);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
.part-title {
|
|
175
175
|
color: if-map-get($part-title-color, $type);
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -181,15 +181,15 @@ h1.part-title {
|
|
|
181
181
|
color: if-map-get($chapter-number-color, $type);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
.chapter-title {
|
|
185
185
|
color: if-map-get($chapter-title-color, $type);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
.chapter-subtitle {
|
|
189
189
|
color: if-map-get($chapter-subtitle-color, $type);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
.chapter-author {
|
|
193
193
|
color: if-map-get($chapter-author-color, $type);
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -198,7 +198,7 @@ h2.chapter-author {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
// BACK MATTER TITLE COLOR
|
|
201
|
-
|
|
201
|
+
.back-matter-title {
|
|
202
202
|
color: if-map-get($back-matter-title-color, $type);
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -101,6 +101,12 @@ section.epigraph
|
|
|
101
101
|
text-indent: 0;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
@if $type == 'prince' {
|
|
105
|
+
.front-matter.with-subsections .front-matter-ugc h1 {
|
|
106
|
+
prince-bookmark-level: 2;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
104
110
|
@if $type == 'epub' {
|
|
105
111
|
@media amzn-mobi {
|
|
106
112
|
#copyright-page {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
display: if-map-get($title-half-title-display, $type);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
#half-title-page >
|
|
12
|
+
#half-title-page > .title {
|
|
13
13
|
margin-top: if-map-get($title-half-title-block-margin-top, $type);
|
|
14
14
|
font-family: $title-half-title-font-family;
|
|
15
15
|
font-size: if-map-get($title-half-title-font-size, $type);
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
word-spacing: $title-half-title-word-spacing;
|
|
21
21
|
text-align: $title-half-title-align;
|
|
22
22
|
text-transform: $title-half-title-text-transform;
|
|
23
|
+
@if $type == 'prince' {
|
|
24
|
+
prince-bookmark-level: none;
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
// Title Page
|
|
26
|
-
|
|
29
|
+
.title {
|
|
27
30
|
margin-top: if-map-get($title-title-margin-top, $type);
|
|
28
31
|
margin-right: if-map-get($title-title-margin-right, $type);
|
|
29
32
|
margin-left: if-map-get($title-title-margin-left, $type);
|
|
@@ -38,6 +41,9 @@ h1.title {
|
|
|
38
41
|
text-transform: $title-title-text-transform;
|
|
39
42
|
border-bottom: if-map-get($title-title-border-bottom-width, $type) $title-title-border-bottom-style if-map-get($title-title-border-bottom-color, $type);
|
|
40
43
|
padding-bottom: if-map-get($title-title-padding-bottom, $type);
|
|
44
|
+
@if $type == 'prince' {
|
|
45
|
+
prince-bookmark-level: none;
|
|
46
|
+
}
|
|
41
47
|
@if $type != 'epub' {
|
|
42
48
|
line-height: if-map-get($title-title-line-height, $type);
|
|
43
49
|
}
|
|
@@ -57,7 +63,7 @@ h1.title {
|
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
.subtitle {
|
|
61
67
|
margin-top: if-map-get($title-subtitle-margin-top, $type);
|
|
62
68
|
margin-right: if-map-get($title-subtitle-margin-right, $type);
|
|
63
69
|
margin-left: if-map-get($title-subtitle-margin-left, $type);
|
|
@@ -77,7 +83,7 @@ h2.subtitle {
|
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
.author {
|
|
81
87
|
margin-top: if-map-get($title-author-margin-top, $type);
|
|
82
88
|
margin-right: if-map-get($title-author-margin-right, $type);
|
|
83
89
|
margin-left: if-map-get($title-author-margin-left, $type);
|
|
@@ -90,6 +96,7 @@ h3.author {
|
|
|
90
96
|
word-spacing: $title-author-word-spacing;
|
|
91
97
|
text-align: $title-author-align;
|
|
92
98
|
text-transform: $title-author-text-transform;
|
|
99
|
+
text-indent: 0;
|
|
93
100
|
border-bottom: if-map-get($title-author-border-bottom-width, $type) $title-author-border-bottom-style if-map-get($title-author-border-bottom-color, $type);
|
|
94
101
|
padding-bottom: if-map-get($title-author-padding-bottom, $type);
|
|
95
102
|
@if $type != 'epub' {
|
|
@@ -108,7 +115,7 @@ div.publisher-logo {
|
|
|
108
115
|
text-align: $title-publisher-logo-text-align;
|
|
109
116
|
}
|
|
110
117
|
|
|
111
|
-
|
|
118
|
+
.publisher {
|
|
112
119
|
display: block;
|
|
113
120
|
float: if-map-get($title-publisher-float, $type);
|
|
114
121
|
margin: if-map-get($title-publisher-margin-top, $type) if-map-get($title-publisher-margin-right, $type) if-map-get($title-publisher-margin-bottom, $type) if-map-get($title-publisher-margin-left, $type);
|
|
@@ -124,11 +131,12 @@ h4.publisher {
|
|
|
124
131
|
word-spacing: $title-publisher-word-spacing;
|
|
125
132
|
text-align: $title-publisher-align;
|
|
126
133
|
text-transform: $title-publisher-text-transform;
|
|
134
|
+
text-indent: 0;
|
|
127
135
|
border-bottom: if-map-get($title-publisher-border-bottom-width, $type) $title-publisher-border-bottom-style if-map-get($title-publisher-border-bottom-color, $type);
|
|
128
136
|
padding-bottom: if-map-get($title-publisher-padding-bottom, $type);
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
|
|
139
|
+
.publisher-city {
|
|
132
140
|
float: if-map-get($title-publisher-city-float, $type);
|
|
133
141
|
margin-top: 0;
|
|
134
142
|
margin-left: if-map-get($title-publisher-city-margin-left, $type);
|
|
@@ -145,11 +153,12 @@ h5.publisher-city {
|
|
|
145
153
|
word-spacing: $title-publisher-city-word-spacing;
|
|
146
154
|
text-align: $title-publisher-city-align;
|
|
147
155
|
text-transform: $title-publisher-city-text-transform;
|
|
156
|
+
text-indent: 0;
|
|
148
157
|
border-bottom: if-map-get($title-publisher-city-border-bottom-width, $type) $title-publisher-city-border-bottom-style if-map-get($title-publisher-city-border-bottom-color, $type);
|
|
149
158
|
padding-bottom: if-map-get($title-publisher-city-padding-bottom, $type);
|
|
150
159
|
}
|
|
151
160
|
|
|
152
|
-
// Prince and EPUB-specific
|
|
161
|
+
// Prince and EPUB-specific display rules
|
|
153
162
|
@mixin titles-prince {
|
|
154
163
|
#title-page {
|
|
155
164
|
> .subtitle,
|
|
@@ -168,40 +177,40 @@ h5.publisher-city {
|
|
|
168
177
|
|
|
169
178
|
@if $type == 'epub' {
|
|
170
179
|
@media amzn-kf8 {
|
|
171
|
-
#title-page
|
|
180
|
+
#title-page .title::before {
|
|
172
181
|
content: '';
|
|
173
182
|
}
|
|
174
183
|
|
|
175
|
-
#title-page
|
|
184
|
+
#title-page .title::after {
|
|
176
185
|
content: '';
|
|
177
186
|
}
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
@media amzn-mobi {
|
|
181
|
-
|
|
190
|
+
.title {
|
|
182
191
|
margin-top: 2em;
|
|
183
192
|
font-size: 2em;
|
|
184
193
|
font-style: normal;
|
|
185
194
|
font-weight: normal;
|
|
186
195
|
}
|
|
187
196
|
|
|
188
|
-
|
|
197
|
+
.subtitle {
|
|
189
198
|
font-size: 1em;
|
|
190
199
|
font-style: normal;
|
|
191
200
|
font-weight: normal;
|
|
192
201
|
}
|
|
193
202
|
|
|
194
|
-
|
|
203
|
+
.author {
|
|
195
204
|
font-style: normal;
|
|
196
205
|
font-weight: normal;
|
|
197
206
|
}
|
|
198
207
|
|
|
199
|
-
|
|
208
|
+
.publisher {
|
|
200
209
|
font-style: normal;
|
|
201
210
|
font-weight: normal;
|
|
202
211
|
}
|
|
203
212
|
|
|
204
|
-
|
|
213
|
+
.publisher-city {
|
|
205
214
|
font-style: normal;
|
|
206
215
|
font-weight: normal;
|
|
207
216
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
.back-matter-title {
|
|
16
16
|
display: block;
|
|
17
17
|
margin-top: if-map-get($back-matter-title-margin-top, $type);
|
|
18
18
|
margin-bottom: 0;
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
font-style: $back-matter-title-font-style;
|
|
22
22
|
font-weight: $back-matter-title-font-weight;
|
|
23
23
|
hyphens: none;
|
|
24
|
+
@if $type == 'prince' {
|
|
25
|
+
prince-bookmark-level: 1;
|
|
26
|
+
}
|
|
24
27
|
@if $type != 'epub' {
|
|
25
28
|
line-height: if-map-get($back-matter-title-line-height, $type);
|
|
26
29
|
}
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
.chapter-subtitle {
|
|
50
53
|
display: block;
|
|
51
54
|
margin-bottom: 0;
|
|
52
55
|
font-family: $section-subtitle-font-family;
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
word-spacing: if-map-get($section-subtitle-word-spacing, $type);
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
.chapter-author {
|
|
67
70
|
display: block;
|
|
68
71
|
margin-bottom: if-map-get($section-author-margin-bottom, $type);
|
|
69
72
|
font-family: $section-author-font-family;
|
|
@@ -78,25 +81,25 @@
|
|
|
78
81
|
word-spacing: if-map-get($section-author-word-spacing, $type);
|
|
79
82
|
}
|
|
80
83
|
|
|
81
|
-
|
|
82
|
-
.short-title +
|
|
84
|
+
.back-matter-title + .chapter-subtitle,
|
|
85
|
+
.short-title + .chapter-subtitle {
|
|
83
86
|
margin-top: if-map-get($section-title-subtitle-spacing, $type);
|
|
84
87
|
}
|
|
85
88
|
|
|
86
|
-
|
|
87
|
-
.short-title +
|
|
89
|
+
.back-matter-title + .chapter-author,
|
|
90
|
+
.short-title + .chapter-author {
|
|
88
91
|
margin-top: if-map-get($section-title-author-spacing, $type);
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
|
|
94
|
+
.chapter-subtitle + .chapter-author {
|
|
92
95
|
margin-top: if-map-get($section-subtitle-author-spacing, $type);
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
.back-matter-title:last-child {
|
|
96
99
|
margin-bottom: if-map-get($back-matter-title-margin-bottom, $type);
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
|
|
102
|
+
.chapter-subtitle:last-child {
|
|
100
103
|
margin-bottom: if-map-get($section-subtitle-margin-bottom, $type);
|
|
101
104
|
}
|
|
102
105
|
}
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
|
|
105
108
|
@if $type == 'epub' {
|
|
106
109
|
@media amzn-mobi {
|
|
107
|
-
|
|
110
|
+
.back-matter-title {
|
|
108
111
|
margin-top: 1em;
|
|
109
112
|
margin-bottom: 1em;
|
|
110
113
|
font-size: 1.3em;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.chapter-title-wrap {
|
|
9
9
|
margin: if-map-get($section-header-margin-top, $type) if-map-get($section-header-margin-right, $type) if-map-get($section-header-margin-bottom, $type) if-map-get($section-header-margin-left, $type);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
.chapter-title {
|
|
12
12
|
border-bottom: if-map-get($chapter-title-border-bottom-width, $type) $chapter-title-border-bottom-style if-map-get($chapter-title-border-bottom-color, $type);
|
|
13
13
|
padding-bottom: if-map-get($chapter-title-padding-bottom, $type);
|
|
14
14
|
display: $chapter-title-display;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
.chapter-subtitle {
|
|
86
86
|
display: block;
|
|
87
87
|
margin-bottom: 0;
|
|
88
88
|
font-family: $section-subtitle-font-family;
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
word-spacing: if-map-get($section-subtitle-word-spacing, $type);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
.chapter-author {
|
|
103
103
|
display: block;
|
|
104
104
|
margin-bottom: if-map-get($section-author-margin-bottom, $type);
|
|
105
105
|
font-family: $section-author-font-family;
|
|
@@ -114,28 +114,34 @@
|
|
|
114
114
|
word-spacing: if-map-get($section-author-word-spacing, $type);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
.short-title +
|
|
117
|
+
.chapter-title + .chapter-subtitle,
|
|
118
|
+
.short-title + .chapter-subtitle {
|
|
119
119
|
margin-top: if-map-get($section-title-subtitle-spacing, $type);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
.short-title +
|
|
122
|
+
.chapter-title + .chapter-author,
|
|
123
|
+
.short-title + .chapter-author {
|
|
124
124
|
margin-top: if-map-get($section-title-author-spacing, $type);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
.chapter-subtitle + .chapter-author {
|
|
128
128
|
margin-top: if-map-get($section-subtitle-author-spacing, $type);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
.chapter-title:last-child {
|
|
132
132
|
margin-bottom: if-map-get($section-title-margin-bottom, $type);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
.chapter-subtitle:last-child {
|
|
136
136
|
margin-bottom: if-map-get($section-subtitle-margin-bottom, $type);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
+
|
|
140
|
+
@if $type == 'prince' {
|
|
141
|
+
div.part ~ .chapter .chapter-title {
|
|
142
|
+
prince-bookmark-level: 2;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
139
145
|
}
|
|
140
146
|
|
|
141
147
|
.aphorism,
|
|
@@ -177,7 +183,7 @@ blockquote.aphorism {
|
|
|
177
183
|
margin-bottom: 0;
|
|
178
184
|
}
|
|
179
185
|
|
|
180
|
-
|
|
186
|
+
.chapter-number {
|
|
181
187
|
margin-top: 1em;
|
|
182
188
|
margin-bottom: 1em;
|
|
183
189
|
font-size: 1.2em;
|
|
@@ -186,7 +192,7 @@ blockquote.aphorism {
|
|
|
186
192
|
text-align: center;
|
|
187
193
|
}
|
|
188
194
|
|
|
189
|
-
|
|
195
|
+
.chapter-title {
|
|
190
196
|
margin-top: 1em;
|
|
191
197
|
margin-bottom: 1em;
|
|
192
198
|
font-size: 1.5em;
|
|
@@ -195,7 +201,7 @@ blockquote.aphorism {
|
|
|
195
201
|
text-align: center;
|
|
196
202
|
}
|
|
197
203
|
|
|
198
|
-
|
|
204
|
+
.chapter-subtitle {
|
|
199
205
|
margin-top: 0.5em;
|
|
200
206
|
margin-bottom: 0.5em;
|
|
201
207
|
font-size: 0.9em;
|
|
@@ -204,7 +210,7 @@ blockquote.aphorism {
|
|
|
204
210
|
text-align: center;
|
|
205
211
|
}
|
|
206
212
|
|
|
207
|
-
|
|
213
|
+
.chapter-author {
|
|
208
214
|
margin-top: 0.5em;
|
|
209
215
|
margin-bottom: 0.5em;
|
|
210
216
|
font-size: 0.8em;
|
|
@@ -215,11 +221,11 @@ blockquote.aphorism {
|
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
@media amzn-kf8 {
|
|
218
|
-
.chapter-title-wrap
|
|
224
|
+
.chapter-title-wrap .chapter-title::before {
|
|
219
225
|
content: '';
|
|
220
226
|
}
|
|
221
227
|
|
|
222
|
-
.chapter-title-wrap
|
|
228
|
+
.chapter-title-wrap .chapter-title::after {
|
|
223
229
|
content: '';
|
|
224
230
|
}
|
|
225
231
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
.front-matter-title {
|
|
16
16
|
display: block;
|
|
17
17
|
margin-top: if-map-get($front-matter-title-margin-top, $type);
|
|
18
18
|
margin-bottom: 0;
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
letter-spacing: if-map-get($front-matter-title-letter-spacing, $type);
|
|
26
26
|
word-spacing: if-map-get($front-matter-title-word-spacing, $type);
|
|
27
27
|
hyphens: none;
|
|
28
|
+
@if $type == 'prince' {
|
|
29
|
+
prince-bookmark-level: 1;
|
|
30
|
+
}
|
|
28
31
|
@if $type != 'epub' {
|
|
29
32
|
line-height: if-map-get($front-matter-title-line-height, $type);
|
|
30
33
|
}
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
.chapter-subtitle {
|
|
50
53
|
display: block;
|
|
51
54
|
margin-bottom: 0;
|
|
52
55
|
font-family: $section-subtitle-font-family;
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
word-spacing: if-map-get($section-subtitle-word-spacing, $type);
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
.chapter-author {
|
|
67
70
|
display: block;
|
|
68
71
|
margin-bottom: if-map-get($section-author-margin-bottom, $type);
|
|
69
72
|
font-family: $section-author-font-family;
|
|
@@ -78,25 +81,25 @@
|
|
|
78
81
|
word-spacing: if-map-get($section-author-word-spacing, $type);
|
|
79
82
|
}
|
|
80
83
|
|
|
81
|
-
|
|
82
|
-
.short-title +
|
|
84
|
+
.front-matter-title + .chapter-subtitle,
|
|
85
|
+
.short-title + .chapter-subtitle {
|
|
83
86
|
margin-top: if-map-get($section-title-subtitle-spacing, $type);
|
|
84
87
|
}
|
|
85
88
|
|
|
86
|
-
|
|
87
|
-
.short-title +
|
|
89
|
+
.front-matter-title + .chapter-author,
|
|
90
|
+
.short-title + .chapter-author {
|
|
88
91
|
margin-top: if-map-get($section-title-author-spacing, $type);
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
|
|
94
|
+
.chapter-subtitle + .chapter-author {
|
|
92
95
|
margin-top: if-map-get($section-subtitle-author-spacing, $type);
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
.front-matter-title:last-child {
|
|
96
99
|
margin-bottom: if-map-get($front-matter-title-margin-bottom, $type);
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
|
|
102
|
+
.chapter-subtitle:last-child {
|
|
100
103
|
margin-bottom: if-map-get($section-subtitle-margin-bottom, $type);
|
|
101
104
|
}
|
|
102
105
|
}
|
|
@@ -137,7 +140,7 @@
|
|
|
137
140
|
|
|
138
141
|
@if $type == 'epub' {
|
|
139
142
|
@media amzn-mobi {
|
|
140
|
-
|
|
143
|
+
.front-matter-title {
|
|
141
144
|
margin-top: 1em;
|
|
142
145
|
margin-bottom: 1em;
|
|
143
146
|
font-size: 1.4em;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
@if $type == 'epub' {
|
|
73
73
|
@media amzn-mobi {
|
|
74
|
-
|
|
74
|
+
.part-number {
|
|
75
75
|
margin-top: 1em;
|
|
76
76
|
margin-bottom: 1em;
|
|
77
77
|
font-size: 1.3em;
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
text-align: center;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
.part-title {
|
|
84
84
|
margin-top: 1em;
|
|
85
85
|
margin-bottom: 1em;
|
|
86
86
|
font-size: 1.4em;
|
|
@@ -180,20 +180,32 @@
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
%learning-objectives {
|
|
184
|
+
@include educational-textbox($learning-objectives-header-color, $learning-objectives-header-background, $learning-objectives-color, $learning-objectives-background);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
%key-takeaways {
|
|
188
|
+
@include educational-textbox($key-takeaways-header-color, $key-takeaways-header-background, $key-takeaways-color, $key-takeaways-background);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
%exercises {
|
|
192
|
+
@include educational-textbox($exercises-header-color, $exercises-header-background, $exercises-color, $exercises-background);
|
|
193
|
+
}
|
|
194
|
+
|
|
183
195
|
.bcc-box {
|
|
184
196
|
@extend .textbox;
|
|
185
197
|
}
|
|
186
198
|
|
|
187
199
|
.bcc-highlight {
|
|
188
|
-
@extend
|
|
200
|
+
@extend %learning-objectives;
|
|
189
201
|
}
|
|
190
202
|
|
|
191
203
|
.bcc-success {
|
|
192
|
-
@extend
|
|
204
|
+
@extend %key-takeaways;
|
|
193
205
|
}
|
|
194
206
|
|
|
195
207
|
.bcc-info {
|
|
196
|
-
@extend
|
|
208
|
+
@extend %exercises;
|
|
197
209
|
}
|
|
198
210
|
|
|
199
211
|
.textbox--sidebar {
|
|
@@ -33,14 +33,10 @@
|
|
|
33
33
|
text-indent: 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.chapter-subtitle {
|
|
37
|
-
hyphens: none;
|
|
38
|
-
text-indent: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.chapter-author {
|
|
36
|
+
.chapter-subtitle, .chapter-author {
|
|
42
37
|
hyphens: none;
|
|
43
38
|
text-indent: 0;
|
|
39
|
+
color: inherit;
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
.chapter-license {
|
|
@@ -219,18 +215,16 @@
|
|
|
219
215
|
}
|
|
220
216
|
|
|
221
217
|
@if $type == 'prince' {
|
|
222
|
-
h3.front-matter-number,
|
|
223
|
-
h3.part-number,
|
|
224
|
-
h3.chapter-number,
|
|
225
|
-
h3.back-matter-number {
|
|
226
|
-
bookmark-level: none;
|
|
227
|
-
}
|
|
228
218
|
|
|
229
219
|
#toc {
|
|
230
220
|
display: $toc-display;
|
|
231
221
|
counter-reset: part;
|
|
232
222
|
page-break-before: right;
|
|
233
223
|
|
|
224
|
+
h1 {
|
|
225
|
+
prince-bookmark-level: 1;
|
|
226
|
+
}
|
|
227
|
+
|
|
234
228
|
a::after {
|
|
235
229
|
content: $toc-page-number-before-content target-counter(attr(href), page);
|
|
236
230
|
font-family: $toc-page-number-font-family;
|
|
@@ -255,7 +255,7 @@ $title-subtitle-line-height: $title-title-line-height !default;
|
|
|
255
255
|
|
|
256
256
|
// Author
|
|
257
257
|
|
|
258
|
-
/// Top margin for title page author on elements
|
|
258
|
+
/// Top margin for title page author on elements with a class of `author`.
|
|
259
259
|
/// @type String | Map
|
|
260
260
|
$title-author-margin-top: (
|
|
261
261
|
epub: 2em,
|
|
@@ -263,21 +263,21 @@ $title-author-margin-top: (
|
|
|
263
263
|
web: 2em
|
|
264
264
|
) !default;
|
|
265
265
|
|
|
266
|
-
/// Right margin for title page author on elements
|
|
266
|
+
/// Right margin for title page author on elements with a class of `author`.
|
|
267
267
|
/// @type String | Map
|
|
268
268
|
/// @since 1.0.0
|
|
269
269
|
$title-author-margin-right: 0 !default;
|
|
270
270
|
|
|
271
|
-
/// Left margin for title page author on elements
|
|
271
|
+
/// Left margin for title page author on elements with a class of `author`.
|
|
272
272
|
/// @type String | Map
|
|
273
273
|
/// @since 1.0.0
|
|
274
274
|
$title-author-margin-left: 0 !default;
|
|
275
275
|
|
|
276
|
-
/// Font stack for title page author on elements
|
|
276
|
+
/// Font stack for title page author on elements with a class of `author`.
|
|
277
277
|
/// @type String
|
|
278
278
|
$title-author-font-family: $font-2 !default;
|
|
279
279
|
|
|
280
|
-
/// Font size for title page author on elements
|
|
280
|
+
/// Font size for title page author on elements with a class of `author`.
|
|
281
281
|
/// @type String | Map
|
|
282
282
|
$title-author-font-size:(
|
|
283
283
|
epub: 1em,
|
|
@@ -285,27 +285,27 @@ $title-author-font-size:(
|
|
|
285
285
|
web: 1em
|
|
286
286
|
) !default;
|
|
287
287
|
|
|
288
|
-
/// Font style for title page author on elements
|
|
288
|
+
/// Font style for title page author on elements with a class of `author`.
|
|
289
289
|
/// @type String
|
|
290
290
|
$title-author-font-style: normal !default;
|
|
291
291
|
|
|
292
|
-
/// Font weight for title page author on elements
|
|
292
|
+
/// Font weight for title page author on elements with a class of `author`.
|
|
293
293
|
/// @type String
|
|
294
294
|
$title-author-font-weight: normal !default;
|
|
295
295
|
|
|
296
|
-
/// Letter spacing for title page author on elements
|
|
296
|
+
/// Letter spacing for title page author on elements with a class of `author`.
|
|
297
297
|
/// @type String
|
|
298
298
|
$title-author-letter-spacing: 1px !default;
|
|
299
299
|
|
|
300
|
-
/// Word spacing for title page author on elements
|
|
300
|
+
/// Word spacing for title page author on elements with a class of `author`.
|
|
301
301
|
/// @type String
|
|
302
302
|
$title-author-word-spacing: 2px !default;
|
|
303
303
|
|
|
304
|
-
/// Text alignment for title page author on elements
|
|
304
|
+
/// Text alignment for title page author on elements with a class of `author`.
|
|
305
305
|
/// @type String
|
|
306
306
|
$title-author-align: center !default;
|
|
307
307
|
|
|
308
|
-
/// Text transform for title page author on elements
|
|
308
|
+
/// Text transform for title page author on elements with a class of `author`.
|
|
309
309
|
/// @type String
|
|
310
310
|
$title-author-text-transform: none !default;
|
|
311
311
|
|
|
@@ -366,64 +366,64 @@ $title-publisher-logo-margin-left: auto !default;
|
|
|
366
366
|
|
|
367
367
|
// Publisher
|
|
368
368
|
|
|
369
|
-
/// Top margin for title page publisher text on elements
|
|
369
|
+
/// Top margin for title page publisher text on elements with a class of `publisher`.
|
|
370
370
|
/// @type String | Map
|
|
371
371
|
/// @since 1.2.0
|
|
372
|
-
$title-publisher-margin-top: (epub:
|
|
372
|
+
$title-publisher-margin-top: (epub: 1.5em, prince: 1.5em, web: 0) !default;
|
|
373
373
|
|
|
374
|
-
/// Right margin for title page publisher text on elements
|
|
374
|
+
/// Right margin for title page publisher text on elements with a class of `publisher`.
|
|
375
375
|
/// @type String | Map
|
|
376
376
|
/// @since 1.2.0
|
|
377
377
|
$title-publisher-margin-right: (epub: 0, prince: 0, web: 0) !default;
|
|
378
378
|
|
|
379
|
-
/// Bottom margin for title page publisher text on elements
|
|
379
|
+
/// Bottom margin for title page publisher text on elements with a class of `publisher`.
|
|
380
380
|
/// @type String | Map
|
|
381
381
|
/// @since 1.2.0
|
|
382
382
|
$title-publisher-margin-bottom: (epub: 0.5em, prince: 0.5em, web: 0.5em) !default;
|
|
383
383
|
|
|
384
|
-
/// Left margin for title page publisher text on elements
|
|
384
|
+
/// Left margin for title page publisher text on elements with a class of `publisher`.
|
|
385
385
|
/// @type String | Map
|
|
386
386
|
/// @since 1.2.0
|
|
387
387
|
$title-publisher-margin-left: (epub: 0, prince: 0, web: 0) !default;
|
|
388
388
|
|
|
389
|
-
/// Float for title page publisher text on elements
|
|
389
|
+
/// Float for title page publisher text on elements with a class of `publisher`.
|
|
390
390
|
/// @type String | Map
|
|
391
391
|
/// @since 1.4.0
|
|
392
392
|
$title-publisher-float: (epub: none, prince: none, web: none) !default;
|
|
393
393
|
|
|
394
|
-
/// Font stack for title page publisher text on elements
|
|
394
|
+
/// Font stack for title page publisher text on elements with a class of `publisher`.
|
|
395
395
|
/// @type String
|
|
396
396
|
$title-publisher-font-family: $font-3 !default;
|
|
397
397
|
|
|
398
|
-
/// Font size for title page publisher text on elements
|
|
398
|
+
/// Font size for title page publisher text on elements with a class of `publisher`.
|
|
399
399
|
/// @type String
|
|
400
400
|
$title-publisher-font-size: 0.9em !default;
|
|
401
401
|
|
|
402
|
-
/// Font style for title page publisher text on elements
|
|
402
|
+
/// Font style for title page publisher text on elements with a class of `publisher`.
|
|
403
403
|
/// @type String
|
|
404
404
|
$title-publisher-font-style: normal !default;
|
|
405
405
|
|
|
406
|
-
/// Font weight for title page publisher text on elements
|
|
406
|
+
/// Font weight for title page publisher text on elements with a class of `publisher`.
|
|
407
407
|
/// @type String
|
|
408
408
|
$title-publisher-font-weight: normal !default;
|
|
409
409
|
|
|
410
|
-
/// Line height for title page publisher text on elements
|
|
410
|
+
/// Line height for title page publisher text on elements with a class of `publisher`.
|
|
411
411
|
/// @type String
|
|
412
412
|
$title-publisher-line-height: 1em !default;
|
|
413
413
|
|
|
414
|
-
/// Letter spacing for title page publisher text on elements
|
|
414
|
+
/// Letter spacing for title page publisher text on elements with a class of `publisher`.
|
|
415
415
|
/// @type String
|
|
416
416
|
$title-publisher-letter-spacing: 1px !default;
|
|
417
417
|
|
|
418
|
-
/// Word spacing for title page publisher text on elements
|
|
418
|
+
/// Word spacing for title page publisher text on elements with a class of `publisher`.
|
|
419
419
|
/// @type String
|
|
420
420
|
$title-publisher-word-spacing: 2px !default;
|
|
421
421
|
|
|
422
|
-
/// Text transform for title page publisher text on elements
|
|
422
|
+
/// Text transform for title page publisher text on elements with a class of `publisher`.
|
|
423
423
|
/// @type String
|
|
424
424
|
$title-publisher-align: center !default;
|
|
425
425
|
|
|
426
|
-
/// Text transform for title page publisher text on elements
|
|
426
|
+
/// Text transform for title page publisher text on elements with a class of `publisher`.
|
|
427
427
|
/// @type String
|
|
428
428
|
$title-publisher-text-transform: none !default;
|
|
429
429
|
|
|
@@ -449,54 +449,54 @@ $title-publisher-padding-bottom: $title-title-padding-bottom !default;
|
|
|
449
449
|
|
|
450
450
|
// Publisher city
|
|
451
451
|
|
|
452
|
-
/// Right margin for title page publisher city text on elements
|
|
452
|
+
/// Right margin for title page publisher city text on elements with a class of `publisher`.
|
|
453
453
|
/// @type String | Map
|
|
454
454
|
/// @since 1.2.0
|
|
455
455
|
$title-publisher-city-margin-right: $title-publisher-margin-right !default;
|
|
456
456
|
|
|
457
|
-
/// Left margin for title page publisher city text on elements
|
|
457
|
+
/// Left margin for title page publisher city text on elements with a class of `publisher`.
|
|
458
458
|
/// @type String | Map
|
|
459
459
|
/// @since 1.2.0
|
|
460
460
|
$title-publisher-city-margin-left: $title-publisher-margin-left !default;
|
|
461
461
|
|
|
462
|
-
/// Float for title page publisher city text on elements
|
|
462
|
+
/// Float for title page publisher city text on elements with a class of `publisher-city`.
|
|
463
463
|
/// @type String | Map
|
|
464
464
|
/// @since 1.4.0
|
|
465
465
|
$title-publisher-city-float: (epub: none, prince: none, web: none) !default;
|
|
466
466
|
|
|
467
|
-
/// Font stack for title page publisher city text on elements
|
|
467
|
+
/// Font stack for title page publisher city text on elements with a class of `publisher-city`.
|
|
468
468
|
/// @type String
|
|
469
469
|
$title-publisher-city-font-family: $font-3 !default;
|
|
470
470
|
|
|
471
|
-
/// Font size for title page publisher city text on elements
|
|
471
|
+
/// Font size for title page publisher city text on elements with a class of `publisher-city`.
|
|
472
472
|
/// @type String
|
|
473
473
|
$title-publisher-city-font-size: 0.9em !default;
|
|
474
474
|
|
|
475
|
-
/// Font style for title page publisher city text on elements
|
|
475
|
+
/// Font style for title page publisher city text on elements with a class of `publisher-city`.
|
|
476
476
|
/// @type String
|
|
477
477
|
$title-publisher-city-font-style: normal !default;
|
|
478
478
|
|
|
479
|
-
/// Font weight for title page publisher city text on elements
|
|
479
|
+
/// Font weight for title page publisher city text on elements with a class of `publisher-city`.
|
|
480
480
|
/// @type String
|
|
481
481
|
$title-publisher-city-font-weight: normal !default;
|
|
482
482
|
|
|
483
|
-
/// Line height for title page publisher city text on elements
|
|
483
|
+
/// Line height for title page publisher city text on elements with a class of `publisher-city`.
|
|
484
484
|
/// @type String
|
|
485
485
|
$title-publisher-city-line-height: 1em !default;
|
|
486
486
|
|
|
487
|
-
/// Letter spacing for title page publisher city text on elements
|
|
487
|
+
/// Letter spacing for title page publisher city text on elements with a class of `publisher-city`.
|
|
488
488
|
/// @type String
|
|
489
489
|
$title-publisher-city-letter-spacing: 1px !default;
|
|
490
490
|
|
|
491
|
-
/// Word spacing for title page publisher city text on elements
|
|
491
|
+
/// Word spacing for title page publisher city text on elements with a class of `publisher-city`.
|
|
492
492
|
/// @type String
|
|
493
493
|
$title-publisher-city-word-spacing: 2px !default;
|
|
494
494
|
|
|
495
|
-
/// Alignment for title page publisher city text on elements
|
|
495
|
+
/// Alignment for title page publisher city text on elements with a class of `publisher-city`.
|
|
496
496
|
/// @type String
|
|
497
497
|
$title-publisher-city-align: center !default;
|
|
498
498
|
|
|
499
|
-
/// Text transform for title page publisher city text on elements
|
|
499
|
+
/// Text transform for title page publisher city text on elements with a class of `publisher-city`.
|
|
500
500
|
/// @type String
|
|
501
501
|
$title-publisher-city-text-transform: uppercase !default;
|
|
502
502
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buckram",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Opinionated SCSS components for books (web, EPUB and PDF).",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "composer install && composer test",
|
|
@@ -12,25 +12,24 @@
|
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/pressbooks/
|
|
16
|
-
"directory": "packages/buckram"
|
|
15
|
+
"url": "git+https://github.com/pressbooks/buckram.git"
|
|
17
16
|
},
|
|
18
17
|
"author": "Pressbooks (Book Oven Inc.)",
|
|
19
18
|
"license": "GPL-3.0-or-later",
|
|
20
19
|
"bugs": {
|
|
21
|
-
"url": "https://github.com/pressbooks/
|
|
20
|
+
"url": "https://github.com/pressbooks/buckram/issues"
|
|
22
21
|
},
|
|
23
|
-
"homepage": "https://github.com/pressbooks/
|
|
22
|
+
"homepage": "https://github.com/pressbooks/buckram#readme",
|
|
24
23
|
"engines": {
|
|
25
|
-
"node": ">=
|
|
24
|
+
"node": ">= 14"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
27
|
"chai": "^4.1.2",
|
|
29
|
-
"mocha": "^
|
|
28
|
+
"mocha": "^10.0.0",
|
|
30
29
|
"pixelmatch": "^5.2.1",
|
|
31
30
|
"polyserve": "^0.27.15",
|
|
32
31
|
"pressbooks-build-tools": "^3.0.1",
|
|
33
|
-
"puppeteer": "^
|
|
32
|
+
"puppeteer": "^16.1.0",
|
|
34
33
|
"sassdoc": "^2.7.1",
|
|
35
34
|
"type-detect": "^4.0.8"
|
|
36
35
|
},
|
|
@@ -43,6 +42,5 @@
|
|
|
43
42
|
"no-descending-specificity": null,
|
|
44
43
|
"no-duplicate-at-import-rules": null
|
|
45
44
|
}
|
|
46
|
-
}
|
|
47
|
-
"gitHead": "d8f356c924ea88204d555650f7c9a28a66ba2292"
|
|
45
|
+
}
|
|
48
46
|
}
|