@canopycanopycanopy/b-ber-theme-serif 3.0.5 → 3.0.7-canary.9
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/_settings.scss +33 -26
- package/application.scss +5 -2
- package/layout/_container.scss +47 -40
- package/layout/_epub.scss +36 -0
- package/layout/_figure.scss +159 -103
- package/layout/_helpers.scss +12 -13
- package/layout/_layout.scss +3 -3
- package/layout/_list.scss +124 -24
- package/layout/{_media.scss → _media-controls.scss} +23 -21
- package/layout/_print.scss +5 -5
- package/layout/_reader.scss +217 -8
- package/layout/_table.scss +10 -6
- package/layout/_text.scss +385 -178
- package/layout/_web.scss +113 -85
- package/layout/index.scss +8 -1
- package/package.json +4 -3
- package/typography/_fonts.scss +3 -6
- package/typography/_reset.scss +0 -6
- package/typography/index.scss +0 -2
- package/_debug.scss +0 -28
- package/mixins/_elements.scss +0 -45
- package/mixins/_fonts.scss +0 -21
- package/mixins/_media-queries.scss +0 -51
- package/mixins/_old.scss +0 -363
- package/mixins/_text.scss +0 -51
- package/mixins/_util.scss +0 -73
- package/mixins/_vertical-rhythm.scss +0 -169
- package/mixins/index.scss +0 -8
- package/typography/_highlight.scss +0 -72
- package/typography/_typography.scss +0 -3
package/_settings.scss
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
// Variables
|
|
2
|
-
|
|
3
1
|
// Colors
|
|
2
|
+
// `$black` is automatically set to #000 for e-ink readers
|
|
4
3
|
$white: #fff !default;
|
|
4
|
+
$grey-0: #eee !default;
|
|
5
|
+
$grey-1: #696969 !default;
|
|
5
6
|
$black: #222 !default;
|
|
6
|
-
$
|
|
7
|
-
$light-grey: #f2f2f2 !default;
|
|
8
|
-
$info: #26a4b7 !default;
|
|
9
|
-
$warning: #da4539 !default;
|
|
10
|
-
$danger: #cd8d59 !default;
|
|
11
|
-
$success: #5050c5 !default;
|
|
12
|
-
|
|
13
|
-
// Set `$grey` in case of e-ink readers
|
|
14
|
-
@if $build == 'mobi' {
|
|
15
|
-
$grey: $black;
|
|
16
|
-
}
|
|
7
|
+
$success: #009500 !default;
|
|
17
8
|
|
|
18
9
|
// General text Layout
|
|
19
10
|
// If new paragraphs should be indented, and if so, by how much. The text indent size
|
|
@@ -21,25 +12,41 @@ $success: #5050c5 !default;
|
|
|
21
12
|
// it's only applied to paragraph elements, so will remain consistent throughout
|
|
22
13
|
// the document
|
|
23
14
|
$text-indent: true !default;
|
|
24
|
-
|
|
15
|
+
|
|
16
|
+
// Must be hard-coded since mixins aren't available here. Can be overridden in
|
|
17
|
+
// project files
|
|
18
|
+
$text-indent-size: 2em !default;
|
|
25
19
|
|
|
26
20
|
// If paragraphs and header elements should have a margin bottom. Margin bottom size
|
|
27
21
|
// is calculated automatically to retain vertial rhythm
|
|
28
22
|
$vertical-space: false !default;
|
|
29
23
|
|
|
30
24
|
// Vertical rhythm settings
|
|
31
|
-
$font-size-base:
|
|
32
|
-
$line-height-base: 1.
|
|
25
|
+
$font-size-base: 1em !default;
|
|
26
|
+
$line-height-base: 1.5 !default;
|
|
27
|
+
|
|
28
|
+
// Fonts
|
|
29
|
+
$font-sans: Helvetica, Arial, sans-serif !default;
|
|
30
|
+
$font-serif: 'Iowan Old Style', Georgia, Times, serif !default;
|
|
31
|
+
$font-mono: Menlo, Osaka, Monaco, monospace !default;
|
|
32
|
+
|
|
33
|
+
// Reader font is set in _reader.scss
|
|
34
|
+
$font-family-base: $font-serif !default;
|
|
35
|
+
|
|
36
|
+
@if $build == 'reader' {
|
|
37
|
+
$font-family-base: $font-serif;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Reader UI elements
|
|
41
|
+
$reader-header-height: 0;
|
|
42
|
+
$reader-footer-height: 0;
|
|
33
43
|
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
$
|
|
37
|
-
$
|
|
44
|
+
// Values for the `fullbleed-vimeo-titlepage` mixin
|
|
45
|
+
// Titlepage color scheme.
|
|
46
|
+
$titlepage-background-color: $black !default;
|
|
47
|
+
$titlepage-text-color: $white !default;
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
// Height of spread-contents used for vertical alignment in pixels
|
|
50
|
+
$spread-height: 600px !default;
|
|
40
51
|
|
|
41
|
-
|
|
42
|
-
$landscape-image-height: 4 !default;
|
|
43
|
-
$square-image-height: 4 !default;
|
|
44
|
-
$portrait-image-height: 5 !default;
|
|
45
|
-
$portrait-image--high-height: 5 !default;
|
|
52
|
+
$titlepage-text-aligment: left !default;
|
package/application.scss
CHANGED
|
@@ -5,17 +5,20 @@
|
|
|
5
5
|
// Load vendor libs
|
|
6
6
|
// https://github.com/modularscale/modularscale-sass
|
|
7
7
|
@import '~modularscale-sass/stylesheets/_modularscale';
|
|
8
|
-
// @import '../../node_modules/modularscale-sass/stylesheets/_modularscale.scss';
|
|
9
8
|
|
|
10
9
|
// For validation while building on CLI, not used in production
|
|
11
10
|
$build: 'epub' !default;
|
|
12
11
|
|
|
13
12
|
@import 'settings';
|
|
14
|
-
@import 'mixins';
|
|
13
|
+
@import '~@canopycanopycanopy/b-ber-theme-mixins/application';
|
|
15
14
|
|
|
16
15
|
// for validation while building on CLI, not an actual setting
|
|
17
16
|
$build: 'epub' !default;
|
|
18
17
|
|
|
18
|
+
.foo {
|
|
19
|
+
font-size: $font-size-base;
|
|
20
|
+
}
|
|
21
|
+
|
|
19
22
|
// Initialize Modular Scale
|
|
20
23
|
//
|
|
21
24
|
// @demo http://www.modularscale.com/
|
package/layout/_container.scss
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
@use 'sass:math';
|
|
2
|
-
|
|
3
1
|
// Set @page margin for e-readers
|
|
4
2
|
@page {
|
|
5
3
|
margin: em-to-px($font-size-base * 2);
|
|
6
4
|
}
|
|
7
5
|
|
|
8
|
-
@if $build == 'epub' {
|
|
9
|
-
html {
|
|
10
|
-
font-size: 62.5%;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
6
|
body {
|
|
15
|
-
@include
|
|
7
|
+
@include variant-weight-regular;
|
|
16
8
|
@include hyphens;
|
|
17
9
|
@include widows;
|
|
18
10
|
@include orphans;
|
|
19
11
|
@include text-rendering;
|
|
20
12
|
@include font-smoothing;
|
|
13
|
+
@include padding('text-default', 0, 0.5);
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
font-size: 1em;
|
|
21
16
|
margin: 0;
|
|
22
|
-
|
|
23
|
-
padding: 0;
|
|
17
|
+
line-height: $line-height-base;
|
|
24
18
|
font-family: $font-family-base;
|
|
19
|
+
text-indent: 0;
|
|
25
20
|
}
|
|
26
21
|
|
|
27
|
-
blockquote
|
|
22
|
+
blockquote,
|
|
23
|
+
.pullquote {
|
|
28
24
|
@include following-element-has-no-top-padding;
|
|
29
|
-
@include
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
@include margin('text-default', 1, 0, 1, 2);
|
|
26
|
+
|
|
27
|
+
@include break('mobile') {
|
|
28
|
+
@include margin('text-default', 1, 0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
font-size: 1em;
|
|
32
|
+
padding: 0;
|
|
33
|
+
|
|
34
|
+
section.dialogue & {
|
|
35
|
+
@include margin('text-default', 1, 0, 2, 2);
|
|
36
|
+
}
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
section {
|
|
@@ -49,10 +54,12 @@ section.break-before a + div.figure__small {
|
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
section.subchapter {
|
|
52
|
-
margin-bottom:
|
|
57
|
+
margin-bottom: two-ems(0);
|
|
58
|
+
|
|
53
59
|
+ section.subchapter > header > h2 {
|
|
54
60
|
padding-top: 0;
|
|
55
61
|
}
|
|
62
|
+
|
|
56
63
|
section.colophon &,
|
|
57
64
|
section.afterword &,
|
|
58
65
|
section.seriespage &,
|
|
@@ -65,18 +72,21 @@ section.subchapter {
|
|
|
65
72
|
|
|
66
73
|
section.bibliography {
|
|
67
74
|
margin-bottom: one-line(0);
|
|
75
|
+
|
|
68
76
|
.subchapter {
|
|
69
77
|
margin-bottom: 0;
|
|
70
78
|
}
|
|
79
|
+
|
|
71
80
|
h3 {
|
|
72
|
-
@include text-
|
|
73
|
-
@include
|
|
81
|
+
@include text-default;
|
|
82
|
+
@include margin('text-default', 0, 0, 1);
|
|
74
83
|
}
|
|
84
|
+
|
|
75
85
|
h1 + .subchapter > h3 {
|
|
76
86
|
padding-top: 0;
|
|
77
87
|
}
|
|
88
|
+
|
|
78
89
|
p {
|
|
79
|
-
@include padding('text-large', 0, 0, 1, 0);
|
|
80
90
|
text-indent: 0;
|
|
81
91
|
}
|
|
82
92
|
}
|
|
@@ -84,8 +94,9 @@ section.bibliography {
|
|
|
84
94
|
.audio,
|
|
85
95
|
.video,
|
|
86
96
|
.vimeo {
|
|
87
|
-
|
|
97
|
+
margin: 0;
|
|
88
98
|
text-align: center;
|
|
99
|
+
|
|
89
100
|
.figure__large & {
|
|
90
101
|
padding: 0;
|
|
91
102
|
}
|
|
@@ -99,14 +110,11 @@ section.bibliography {
|
|
|
99
110
|
.vimeo {
|
|
100
111
|
&.video--4x3,
|
|
101
112
|
&.vimeo--4x3 {
|
|
102
|
-
@
|
|
103
|
-
width: 100%;
|
|
104
|
-
} @else {
|
|
105
|
-
width: 80%;
|
|
106
|
-
}
|
|
107
|
-
@include break-at('xs') {
|
|
113
|
+
@include break-at('mobile') {
|
|
108
114
|
width: 100%;
|
|
109
115
|
}
|
|
116
|
+
|
|
117
|
+
width: 100%;
|
|
110
118
|
margin-left: auto;
|
|
111
119
|
margin-right: auto;
|
|
112
120
|
}
|
|
@@ -137,15 +145,15 @@ video,
|
|
|
137
145
|
// Outer container
|
|
138
146
|
|
|
139
147
|
&.vimeo--4x3 .embed.supported {
|
|
140
|
-
padding-top:
|
|
148
|
+
padding-top: calc(3 / 4 * 100%);
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
&.vimeo--16x9 .embed.supported {
|
|
144
|
-
padding-top:
|
|
152
|
+
padding-top: calc(9 / 16 * 100%);
|
|
145
153
|
}
|
|
146
154
|
|
|
147
155
|
&.vimeo--21x9 .embed.supported {
|
|
148
|
-
padding-top:
|
|
156
|
+
padding-top: calc(9 / 21 * 100%);
|
|
149
157
|
}
|
|
150
158
|
|
|
151
159
|
// Inner container
|
|
@@ -172,7 +180,7 @@ video,
|
|
|
172
180
|
}
|
|
173
181
|
|
|
174
182
|
aside.note {
|
|
175
|
-
@include
|
|
183
|
+
@include margin('text-default', 0, 0, 1, 0);
|
|
176
184
|
text-align: left;
|
|
177
185
|
margin: 0;
|
|
178
186
|
p {
|
|
@@ -184,9 +192,9 @@ aside.note {
|
|
|
184
192
|
}
|
|
185
193
|
|
|
186
194
|
.pullquote {
|
|
187
|
-
@include
|
|
195
|
+
@include text-default;
|
|
196
|
+
@include margin('text-default', 0, 2, 1, 2);
|
|
188
197
|
text-indent: 0;
|
|
189
|
-
font-size: one-em(0);
|
|
190
198
|
|
|
191
199
|
section.titlepage &,
|
|
192
200
|
section.introduction &,
|
|
@@ -198,7 +206,7 @@ aside.note {
|
|
|
198
206
|
}
|
|
199
207
|
|
|
200
208
|
.epigraph & {
|
|
201
|
-
@include
|
|
209
|
+
@include margin('text-default', 0, 1, 2, 1);
|
|
202
210
|
float: none;
|
|
203
211
|
margin-top: 0;
|
|
204
212
|
}
|
|
@@ -212,17 +220,16 @@ section.backmatter {
|
|
|
212
220
|
text-align: left;
|
|
213
221
|
margin: 0;
|
|
214
222
|
padding: 0;
|
|
223
|
+
|
|
215
224
|
img {
|
|
216
225
|
height: auto;
|
|
217
226
|
width: auto;
|
|
218
227
|
text-align: left;
|
|
219
228
|
margin: 0;
|
|
220
229
|
padding: 0;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
@if $build == 'reader' {
|
|
225
|
-
width: 60px !important; // sass-lint:disable-line no-important
|
|
230
|
+
|
|
231
|
+
@if $build == 'web' or $build == 'reader' {
|
|
232
|
+
width: 60px !important;
|
|
226
233
|
}
|
|
227
234
|
}
|
|
228
235
|
}
|
|
@@ -231,16 +238,16 @@ section.backmatter {
|
|
|
231
238
|
section.staff {
|
|
232
239
|
h3 {
|
|
233
240
|
@include text-medium;
|
|
241
|
+
@include variant-weight-bold;
|
|
234
242
|
text-align: left;
|
|
235
243
|
margin: 0;
|
|
236
244
|
padding: 0;
|
|
237
|
-
font-weight: bold;
|
|
238
245
|
}
|
|
239
246
|
}
|
|
240
247
|
|
|
241
248
|
.masthead h2 {
|
|
242
249
|
@include text-medium;
|
|
243
|
-
|
|
250
|
+
@include variant-weight-bold;
|
|
244
251
|
font-family: inherit;
|
|
245
252
|
padding-top: 0;
|
|
246
253
|
text-align: left;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@if $build == 'epub' {
|
|
2
|
+
html {
|
|
3
|
+
font-size: 62.5%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
font-family: $font-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.frontmatter.titlepage {
|
|
11
|
+
#title-page-spread {
|
|
12
|
+
background: none;
|
|
13
|
+
|
|
14
|
+
ul {
|
|
15
|
+
@include type-settings(0);
|
|
16
|
+
list-style: none;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin-bottom: two-ems(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#title-dek {
|
|
22
|
+
h1,
|
|
23
|
+
h2 {
|
|
24
|
+
@include type-settings(18);
|
|
25
|
+
@include variant-weight(300, 300);
|
|
26
|
+
line-height: 0.9em;
|
|
27
|
+
margin-bottom: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
p {
|
|
31
|
+
margin-top: two-ems(0);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|