asciidoctor-epub3 1.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.adoc +22 -0
- data/NOTICE.adoc +53 -0
- data/README.adoc +744 -0
- data/Rakefile +78 -0
- data/bin/adb-push-ebook +25 -0
- data/bin/asciidoctor-epub3 +15 -0
- data/data/fonts/assorted-icons.ttf +0 -0
- data/data/fonts/fontawesome-icons.ttf +0 -0
- data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-bolditalic-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
- data/data/fonts/mplus1p-bold-latin-cyrillic.ttf +0 -0
- data/data/fonts/mplus1p-bold-latin-ext.ttf +0 -0
- data/data/fonts/mplus1p-bold-latin.ttf +0 -0
- data/data/fonts/mplus1p-bold-multilingual.ttf +0 -0
- data/data/fonts/mplus1p-light-latin-cyrillic.ttf +0 -0
- data/data/fonts/mplus1p-light-latin-ext.ttf +0 -0
- data/data/fonts/mplus1p-light-latin.ttf +0 -0
- data/data/fonts/mplus1p-light-multilingual.ttf +0 -0
- data/data/fonts/mplus1p-regular-latin-cyrillic.ttf +0 -0
- data/data/fonts/mplus1p-regular-latin-ext.ttf +0 -0
- data/data/fonts/mplus1p-regular-latin.ttf +0 -0
- data/data/fonts/mplus1p-regular-multilingual.ttf +0 -0
- data/data/fonts/notoserif-bold-latin-cyrillic.ttf +0 -0
- data/data/fonts/notoserif-bold-latin-ext.ttf +0 -0
- data/data/fonts/notoserif-bold-latin.ttf +0 -0
- data/data/fonts/notoserif-bold-multilingual.ttf +0 -0
- data/data/fonts/notoserif-bolditalic-latin-cyrillic.ttf +0 -0
- data/data/fonts/notoserif-bolditalic-latin-ext.ttf +0 -0
- data/data/fonts/notoserif-bolditalic-latin.ttf +0 -0
- data/data/fonts/notoserif-bolditalic-multilingual.ttf +0 -0
- data/data/fonts/notoserif-italic-latin-cyrillic.ttf +0 -0
- data/data/fonts/notoserif-italic-latin-ext.ttf +0 -0
- data/data/fonts/notoserif-italic-latin.ttf +0 -0
- data/data/fonts/notoserif-italic-multilingual.ttf +0 -0
- data/data/fonts/notoserif-regular-latin-cyrillic.ttf +0 -0
- data/data/fonts/notoserif-regular-latin-ext.ttf +0 -0
- data/data/fonts/notoserif-regular-latin.ttf +0 -0
- data/data/fonts/notoserif-regular-multilingual.ttf +0 -0
- data/data/images/default-avatar.jpg +0 -0
- data/data/images/default-avatar.png +0 -0
- data/data/images/default-avatar.svg +67 -0
- data/data/images/default-cover-large.png +0 -0
- data/data/images/default-cover.png +0 -0
- data/data/images/default-cover.svg +53 -0
- data/data/images/default-headshot.jpg +0 -0
- data/data/images/default-headshot.png +0 -0
- data/data/samples/asciidoctor-epub3-readme.adoc +744 -0
- data/data/samples/asciidoctor-js-extension.adoc +46 -0
- data/data/samples/asciidoctor-js-introduction.adoc +91 -0
- data/data/samples/i18n.adoc +161 -0
- data/data/samples/images/asciidoctor-js-chrome-extension.png +0 -0
- data/data/samples/images/avatars/graphitefriction.png +0 -0
- data/data/samples/images/avatars/mogztter.png +0 -0
- data/data/samples/images/avatars/mojavelinux.png +0 -0
- data/data/samples/images/correct-text-justification.png +0 -0
- data/data/samples/images/incorrect-text-justification.png +0 -0
- data/data/samples/images/screenshots/chapter-title-day.png +0 -0
- data/data/samples/images/screenshots/chapter-title.png +0 -0
- data/data/samples/images/screenshots/figure-admonition.png +0 -0
- data/data/samples/images/screenshots/section-title-paragraph.png +0 -0
- data/data/samples/images/screenshots/sidebar.png +0 -0
- data/data/samples/images/screenshots/table.png +0 -0
- data/data/samples/images/screenshots/text.png +0 -0
- data/data/samples/sample-book.adoc +20 -0
- data/data/samples/sample-content.adoc +168 -0
- data/data/styles/color-palette.css +28 -0
- data/data/styles/epub3-css3-only.css +161 -0
- data/data/styles/epub3-fonts.css +94 -0
- data/data/styles/epub3.css +1293 -0
- data/lib/asciidoctor-epub3.rb +5 -0
- data/lib/asciidoctor-epub3/converter.rb +859 -0
- data/lib/asciidoctor-epub3/core_ext/string.rb +7 -0
- data/lib/asciidoctor-epub3/font_icon_map.rb +376 -0
- data/lib/asciidoctor-epub3/packager.rb +466 -0
- data/lib/asciidoctor-epub3/spine_item_processor.rb +72 -0
- data/lib/asciidoctor-epub3/version.rb +5 -0
- data/scripts/generate-font-subsets.pe +225 -0
- metadata +192 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
.palette-grayscale {
|
2
|
+
color: #191918; /* black :: literal, blockquote text */
|
3
|
+
color: #333332; /* off-black :: body text, heading default, chapter header background */
|
4
|
+
color: #4F4F4C; /* deep gray :: h4 */
|
5
|
+
/* what about 40403E or 4C4C4B? for h4 */
|
6
|
+
color: #666665; /* dark gray :: h5, visited link, list bullets, abstract, caption, open quote */
|
7
|
+
color: #80807F; /* medium gray :: table borders */
|
8
|
+
color: #B3B3B1; /* gray :: chapter title, footer subtitle, sidebar border */
|
9
|
+
color: #DCDCDE; /* lighter gray :: footer lines, byline text, pre border, masthead bottom line */
|
10
|
+
/* what about DEDEDC instead of DCDCDE? */
|
11
|
+
color: #F2F2F2; /* off white :: pre background, sidebar background */
|
12
|
+
color: #FFFFFF; /* white :: chapter subtitle */
|
13
|
+
}
|
14
|
+
|
15
|
+
.palette-color {
|
16
|
+
color: #468C54; /* medium green :: code annotation numbers */
|
17
|
+
color: #57AD68; /* green :: end mark, chapter title keyword */
|
18
|
+
color: #A9D8B2; /* light green */
|
19
|
+
}
|
20
|
+
|
21
|
+
/*
|
22
|
+
type scale::
|
23
|
+
50 2.27
|
24
|
+
32 1.45
|
25
|
+
30 1.36
|
26
|
+
24 1.1
|
27
|
+
22 1
|
28
|
+
*/
|
@@ -0,0 +1,161 @@
|
|
1
|
+
/* Gitden & Namo default to 16px font-size; bump it to 20px (125%) */
|
2
|
+
body.gitden-reader,
|
3
|
+
body.namo-epub-library {
|
4
|
+
font-size: 125%;
|
5
|
+
}
|
6
|
+
|
7
|
+
/* Gitden doesn't give us much margin, so let's match Kindle */
|
8
|
+
body.gitden-reader {
|
9
|
+
margin: 0 25pt;
|
10
|
+
}
|
11
|
+
|
12
|
+
/* Namo has the same margin problem, except setting side margins doesn't work */
|
13
|
+
/*body.namo-epub-library > section.chapter {
|
14
|
+
margin: 0 25pt;
|
15
|
+
}*/
|
16
|
+
|
17
|
+
/* Use tighter margins and smaller font (18px) on phones (Nexus 4 and smaller) */
|
18
|
+
@media only screen and (max-device-width: 768px) and (max-device-height: 1280px),
|
19
|
+
only screen and (max-device-width: 1280px) and (max-device-height: 768px) {
|
20
|
+
body.gitden-reader,
|
21
|
+
body.namo-epub-library {
|
22
|
+
font-size: 112.5%;
|
23
|
+
}
|
24
|
+
|
25
|
+
body.gitden-reader {
|
26
|
+
margin: 0 5pt;
|
27
|
+
}
|
28
|
+
|
29
|
+
/*body.namo-epub-library > section.chapter {
|
30
|
+
margin: 0 5pt;
|
31
|
+
} */
|
32
|
+
}
|
33
|
+
|
34
|
+
body.gitden-reader a:link {
|
35
|
+
color: #333332 !important;
|
36
|
+
}
|
37
|
+
|
38
|
+
@media amzn-kf8, amzn-mobi {
|
39
|
+
/* Kindle does its own margin management, so don't use an explicit margin */
|
40
|
+
/*body {
|
41
|
+
margin: 0 !important;
|
42
|
+
}*/
|
43
|
+
|
44
|
+
/* text-rendering is the only way to enable kerning in Kindle (and Calibre, though it seems to kern automatically) */
|
45
|
+
/* personally, I think Kindle overdoes kerning, but we're running with it for now */
|
46
|
+
h1, h2, h3, h4, h5, h6,
|
47
|
+
body p, li, dd, blockquote > footer,
|
48
|
+
th, td, figcaption, caption {
|
49
|
+
text-rendering: optimizeLegibility;
|
50
|
+
}
|
51
|
+
|
52
|
+
/* hack line height of subtitle using floats on Kindle */
|
53
|
+
h1.chapter-title .subtitle {
|
54
|
+
margin-top: -0.2em;
|
55
|
+
margin-bottom: 0.3em; /* compensate for reduced line height */
|
56
|
+
}
|
57
|
+
|
58
|
+
/* NOTE using b instead of span since Firefox ePubReader applies immutable styles to span */
|
59
|
+
h1.chapter-title .subtitle > b {
|
60
|
+
float: left;
|
61
|
+
display: inline-block;
|
62
|
+
margin-bottom: -0.3em; /* reduce the line height */
|
63
|
+
padding-right: 0.2em; /* spacing between words */
|
64
|
+
}
|
65
|
+
|
66
|
+
h1.chapter-title .subtitle > b:last-child {
|
67
|
+
padding-right: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
h1.chapter-title .subtitle::after {
|
71
|
+
display: table;
|
72
|
+
content: ' ';
|
73
|
+
clear: both;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
.chapter-header p.byline {
|
78
|
+
height: auto; /* Aldiko requires this value to be 0; reset it for all others */
|
79
|
+
}
|
80
|
+
|
81
|
+
/* Font-based icons */
|
82
|
+
.icon {
|
83
|
+
display: inline-block;
|
84
|
+
font-family: "FontAwesome";
|
85
|
+
font-style: normal !important;
|
86
|
+
font-weight: normal !important;
|
87
|
+
line-height: 1;
|
88
|
+
}
|
89
|
+
|
90
|
+
.icon-1_5x {
|
91
|
+
padding: 0 0.25em;
|
92
|
+
-webkit-transform: scale(1.5, 1.5);
|
93
|
+
transform: scale(1.5, 1.5);
|
94
|
+
}
|
95
|
+
|
96
|
+
.icon-2x {
|
97
|
+
padding: 0 0.5em;
|
98
|
+
-webkit-transform: scale(2, 2);
|
99
|
+
transform: scale(2, 2);
|
100
|
+
}
|
101
|
+
|
102
|
+
.icon-small {
|
103
|
+
font-size: 0.85em;
|
104
|
+
vertical-align: 0.075em;
|
105
|
+
}
|
106
|
+
|
107
|
+
.icon-1_5em {
|
108
|
+
font-size: 1.5em;
|
109
|
+
}
|
110
|
+
|
111
|
+
.icon-2em {
|
112
|
+
font-size: 2em;
|
113
|
+
}
|
114
|
+
|
115
|
+
.icon-3em {
|
116
|
+
font-size: 3em;
|
117
|
+
}
|
118
|
+
|
119
|
+
.icon-4em {
|
120
|
+
font-size: 4em;
|
121
|
+
}
|
122
|
+
|
123
|
+
.icon-rotate-90 {
|
124
|
+
-webkit-transform: rotate(90deg);
|
125
|
+
transform: rotate(90deg);
|
126
|
+
}
|
127
|
+
|
128
|
+
.icon-rotate-90i {
|
129
|
+
-webkit-transform: scale(-1, 1) rotate(90deg);
|
130
|
+
transform: scale(-1, 1) rotate(90deg);
|
131
|
+
}
|
132
|
+
|
133
|
+
.icon-rotate-180 {
|
134
|
+
-webkit-transform: rotate(180deg);
|
135
|
+
transform: rotate(180deg);
|
136
|
+
}
|
137
|
+
|
138
|
+
.icon-rotate-180i {
|
139
|
+
-webkit-transform: scale(-1, 1) rotate(180deg);
|
140
|
+
transform: scale(-1, 1) rotate(180deg);
|
141
|
+
}
|
142
|
+
|
143
|
+
.icon-rotate-270 {
|
144
|
+
-webkit-transform: rotate(270deg);
|
145
|
+
transform: rotate(270deg);
|
146
|
+
}
|
147
|
+
|
148
|
+
.icon-rotate-270i {
|
149
|
+
-webkit-transform: scale(-1, 1) rotate(270deg);
|
150
|
+
transform: scale(-1, 1) rotate(270deg);
|
151
|
+
}
|
152
|
+
|
153
|
+
.icon-flip-h {
|
154
|
+
-webkit-transform: scale(-1, 1);
|
155
|
+
transform: scale(-1, 1);
|
156
|
+
}
|
157
|
+
|
158
|
+
.icon-flip-v {
|
159
|
+
-webkit-transform: scale(1, -1);
|
160
|
+
transform: scale(1, -1);
|
161
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: "Noto Serif";
|
3
|
+
font-style: normal;
|
4
|
+
font-weight: normal;
|
5
|
+
src: url(../fonts/notoserif-regular-latin.ttf);
|
6
|
+
}
|
7
|
+
|
8
|
+
@font-face {
|
9
|
+
font-family: "Noto Serif";
|
10
|
+
font-style: italic;
|
11
|
+
font-weight: normal;
|
12
|
+
src: url(../fonts/notoserif-italic-latin.ttf);
|
13
|
+
}
|
14
|
+
|
15
|
+
@font-face {
|
16
|
+
font-family: "Noto Serif";
|
17
|
+
font-style: normal;
|
18
|
+
font-weight: bold;
|
19
|
+
src: url(../fonts/notoserif-bold-latin.ttf);
|
20
|
+
}
|
21
|
+
|
22
|
+
@font-face {
|
23
|
+
font-family: "Noto Serif";
|
24
|
+
font-style: italic;
|
25
|
+
font-weight: bold;
|
26
|
+
src: url(../fonts/notoserif-bolditalic-latin.ttf);
|
27
|
+
}
|
28
|
+
|
29
|
+
/* NOTE: use numeric font weights for M+ 1p since we're using weight variations */
|
30
|
+
@font-face {
|
31
|
+
font-family: "M+ 1p";
|
32
|
+
font-style: normal;
|
33
|
+
font-weight: 400;
|
34
|
+
src: url(../fonts/mplus1p-regular-latin.ttf);
|
35
|
+
}
|
36
|
+
|
37
|
+
@font-face {
|
38
|
+
font-family: "M+ 1p";
|
39
|
+
font-style: normal;
|
40
|
+
font-weight: 200;
|
41
|
+
src: url(../fonts/mplus1p-light-latin.ttf);
|
42
|
+
}
|
43
|
+
|
44
|
+
@font-face {
|
45
|
+
font-family: "M+ 1p";
|
46
|
+
font-style: normal;
|
47
|
+
font-weight: 700;
|
48
|
+
src: url(../fonts/mplus1p-bold-latin.ttf);
|
49
|
+
}
|
50
|
+
|
51
|
+
@font-face {
|
52
|
+
font-family: "M+ 1mn";
|
53
|
+
font-style: normal;
|
54
|
+
font-weight: normal;
|
55
|
+
src: url(../fonts/mplus1mn-regular-ascii-conums.ttf);
|
56
|
+
}
|
57
|
+
|
58
|
+
@font-face {
|
59
|
+
font-family: "M+ 1mn";
|
60
|
+
font-style: italic;
|
61
|
+
font-weight: normal;
|
62
|
+
/* actually the M+ 1mn light font repurposed using FontForge to stand-in for Italic */
|
63
|
+
src: url(../fonts/mplus1mn-italic-ascii.ttf);
|
64
|
+
}
|
65
|
+
|
66
|
+
@font-face {
|
67
|
+
font-family: "M+ 1mn";
|
68
|
+
font-style: normal;
|
69
|
+
font-weight: bold;
|
70
|
+
/* actually the M+ 1mn medium font repurposed using FontForge to stand-in for Bold */
|
71
|
+
src: url(../fonts/mplus1mn-bold-ascii.ttf);
|
72
|
+
}
|
73
|
+
|
74
|
+
@font-face {
|
75
|
+
font-family: "M+ 1mn";
|
76
|
+
font-style: italic;
|
77
|
+
font-weight: bold;
|
78
|
+
/* actually the M+ 1mn bold font repurposed using FontForge to stand-in for Bold Italic */
|
79
|
+
src: url(../fonts/mplus1mn-bolditalic-ascii.ttf);
|
80
|
+
}
|
81
|
+
|
82
|
+
@font-face {
|
83
|
+
font-family: "FontAwesome";
|
84
|
+
font-style: normal;
|
85
|
+
font-weight: normal;
|
86
|
+
src: url(../fonts/fontawesome-icons.ttf);
|
87
|
+
}
|
88
|
+
|
89
|
+
@font-face {
|
90
|
+
font-family: "FontIcons";
|
91
|
+
font-style: normal;
|
92
|
+
font-weight: normal;
|
93
|
+
src: url(../fonts/assorted-icons.ttf);
|
94
|
+
}
|
@@ -0,0 +1,1293 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
@import url("epub3-fonts.css");
|
3
|
+
|
4
|
+
*, *:before, *:after {
|
5
|
+
box-sizing: border-box;
|
6
|
+
}
|
7
|
+
|
8
|
+
/* educate older readers about tags introduced in HTML5 */
|
9
|
+
article, aside, details, figcaption, figure,
|
10
|
+
footer, header, nav, section, summary {
|
11
|
+
display: block;
|
12
|
+
}
|
13
|
+
|
14
|
+
/* html and body declarations must be separate entries for some readers */
|
15
|
+
html {
|
16
|
+
margin: 0 !important;
|
17
|
+
padding: 0 !important;
|
18
|
+
/* set the em base (and relative em anchor) by setting the font-size on html */
|
19
|
+
/* TODO set font-size > 100% except for Kindle */
|
20
|
+
font-size: 100%;
|
21
|
+
-webkit-text-size-adjust: 100%;
|
22
|
+
}
|
23
|
+
|
24
|
+
/* don't set margin on body as that's how many readers frame reading area */
|
25
|
+
/* can't set the font-family on body in Kindle */
|
26
|
+
body {
|
27
|
+
padding: 0 !important;
|
28
|
+
/* add margin to ~ match Kindle's narrow setting */
|
29
|
+
/* don't use !important on margin as it breaks calibre */
|
30
|
+
margin: 0;
|
31
|
+
font-size: 100%;
|
32
|
+
/* NOTE putting optimizeLegibility on the body slow down rendering considerably */
|
33
|
+
text-rendering: optimizeSpeed;
|
34
|
+
/* -webkit-font-smoothing has no noticable effect and is controversial, so leaving it off */
|
35
|
+
}
|
36
|
+
|
37
|
+
/* disables night mode in Aldiko, hoo-ha! */
|
38
|
+
html body {
|
39
|
+
background-color: #FFFFFF;
|
40
|
+
}
|
41
|
+
|
42
|
+
/* sets minimum margin permitted */
|
43
|
+
/* @page not supported by Kindle or GitDen */
|
44
|
+
@page {
|
45
|
+
/* push the top & bottom margins down in Aldiko to emulate Kindle (Kindle uses ~ 10% of screen by default )*/
|
46
|
+
margin: 1cm;
|
47
|
+
}
|
48
|
+
|
49
|
+
div, p, blockquote, pre, figure, figcaption,
|
50
|
+
h1, h2, h3, h4, h5, h6,
|
51
|
+
dl, dt, dd, ol, ul, li,
|
52
|
+
table, caption, thead, tfoot, tbody, tr, th, td {
|
53
|
+
margin: 0;
|
54
|
+
padding: 0;
|
55
|
+
font-size: 100%;
|
56
|
+
vertical-align: baseline;
|
57
|
+
}
|
58
|
+
|
59
|
+
a, abbr, address, cite, code, em, kbd, span, strong {
|
60
|
+
font-size: 100%;
|
61
|
+
}
|
62
|
+
|
63
|
+
a {
|
64
|
+
background: transparent;
|
65
|
+
}
|
66
|
+
|
67
|
+
a:active, a:hover {
|
68
|
+
outline: 0;
|
69
|
+
}
|
70
|
+
|
71
|
+
abbr[title] {
|
72
|
+
border-bottom: 1px dotted;
|
73
|
+
}
|
74
|
+
|
75
|
+
address {
|
76
|
+
white-space: pre-line;
|
77
|
+
}
|
78
|
+
|
79
|
+
b, strong {
|
80
|
+
font-weight: bold;
|
81
|
+
}
|
82
|
+
|
83
|
+
b.button {
|
84
|
+
font-weight: normal;
|
85
|
+
text-shadow: 1px 0 0 #B3B3B1;
|
86
|
+
color: #191918;
|
87
|
+
}
|
88
|
+
|
89
|
+
b.button .label {
|
90
|
+
padding: 0 0.25em;
|
91
|
+
}
|
92
|
+
|
93
|
+
kbd {
|
94
|
+
display: inline-block;
|
95
|
+
font-size: 0.8em;
|
96
|
+
line-height: 1;
|
97
|
+
background-color: #F7F7F7; /* #FAFAFA */
|
98
|
+
border: 1px solid #BEBEBC;
|
99
|
+
-webkit-border-radius: 3px;
|
100
|
+
border-radius: 3px;
|
101
|
+
-webkit-box-shadow: 1px 1px 0 rgba(102, 102, 101, 0.25), 0 0 0 1px white inset;
|
102
|
+
box-shadow: 1px 1px 0 rgba(102, 102, 101, 0.25), 0 0 0 1px white inset;
|
103
|
+
margin: 0 0.15em;
|
104
|
+
padding: 0.25em 0.4em 0.2em 0.4em;
|
105
|
+
vertical-align: 0.15em;
|
106
|
+
}
|
107
|
+
|
108
|
+
.keyseq {
|
109
|
+
white-space: nowrap;
|
110
|
+
}
|
111
|
+
|
112
|
+
.menuseq .caret {
|
113
|
+
/*
|
114
|
+
font-family: "FontAwesome";
|
115
|
+
font-size: 0.7em;
|
116
|
+
line-height: 1;
|
117
|
+
font-weight: bold;
|
118
|
+
vertical-align: 0.08rem;
|
119
|
+
*/
|
120
|
+
|
121
|
+
font-weight: bold;
|
122
|
+
}
|
123
|
+
|
124
|
+
.menuseq span[class~="caret"] {
|
125
|
+
visibility: hidden;
|
126
|
+
}
|
127
|
+
|
128
|
+
.menuseq .caret::before {
|
129
|
+
font-family: "FontAwesome";
|
130
|
+
content: "\f054";
|
131
|
+
font-size: 0.6em;
|
132
|
+
vertical-align: 0.15em;
|
133
|
+
visibility: visible;
|
134
|
+
display: inline-block;
|
135
|
+
width: 0;
|
136
|
+
padding-right: 0.15em;
|
137
|
+
}
|
138
|
+
|
139
|
+
img {
|
140
|
+
border: 0;
|
141
|
+
}
|
142
|
+
|
143
|
+
mark {
|
144
|
+
background-color: #FFC14F;
|
145
|
+
color: #191918;
|
146
|
+
}
|
147
|
+
|
148
|
+
small {
|
149
|
+
font-size: 80%;
|
150
|
+
}
|
151
|
+
|
152
|
+
sub, sup {
|
153
|
+
font-size: 0.75em;
|
154
|
+
line-height: 1;
|
155
|
+
}
|
156
|
+
|
157
|
+
sup {
|
158
|
+
/* position: relative not permitted on Kindle */
|
159
|
+
/*
|
160
|
+
position: relative;
|
161
|
+
top: -0.5em;
|
162
|
+
*/
|
163
|
+
/* alternate approach #1 */
|
164
|
+
/*
|
165
|
+
display: inline-block;
|
166
|
+
vertical-align: text-top;
|
167
|
+
padding-top: .25em;
|
168
|
+
*/
|
169
|
+
/* alternate approach #2 */
|
170
|
+
line-height: 1;
|
171
|
+
vertical-align: text-top;
|
172
|
+
}
|
173
|
+
|
174
|
+
sub {
|
175
|
+
/* position: relative not permitted on Kindle */
|
176
|
+
/*
|
177
|
+
position: relative;
|
178
|
+
bottom: -0.25em;
|
179
|
+
*/
|
180
|
+
/* alternate approach #1 */
|
181
|
+
/*
|
182
|
+
display: inline-block;
|
183
|
+
vertical-align: text-bottom;
|
184
|
+
padding-bottom: .5em;
|
185
|
+
*/
|
186
|
+
/* alternate approach #2 */
|
187
|
+
line-height: 1;
|
188
|
+
vertical-align: text-bottom;
|
189
|
+
}
|
190
|
+
|
191
|
+
table {
|
192
|
+
border-collapse: collapse;
|
193
|
+
border-spacing: 0;
|
194
|
+
}
|
195
|
+
|
196
|
+
td, th {
|
197
|
+
padding: 0;
|
198
|
+
}
|
199
|
+
|
200
|
+
body a:link {
|
201
|
+
color: #333332;
|
202
|
+
/* hack for font color in iBooks */
|
203
|
+
-webkit-text-fill-color: #333332;
|
204
|
+
/* Kindle requires the !important on text-decoration */
|
205
|
+
/* In night mode, the only indicator of a link is the underline, so we need it or a background image */
|
206
|
+
text-decoration: none !important;
|
207
|
+
border-bottom: 1px dashed #666665;
|
208
|
+
/* allow URLs to break anywhere if they don't fit on a line; but how do we know it's a URL? */
|
209
|
+
/*
|
210
|
+
word-break: break-all;
|
211
|
+
*/
|
212
|
+
}
|
213
|
+
|
214
|
+
body:first-of-type a:link {
|
215
|
+
border-bottom: none;
|
216
|
+
background-repeat: no-repeat;
|
217
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, #666665 5%, #666665 95%, rgba(255,255,255,0) 100%);
|
218
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 0%, #666665 5%, #666665 95%, rgba(255,255,255,0) 100%);
|
219
|
+
background-size: 100% 1px;
|
220
|
+
background-position: 0 1.2em;
|
221
|
+
}
|
222
|
+
|
223
|
+
body a:visited {
|
224
|
+
color: #666665;
|
225
|
+
/* hack for font color in iBooks */
|
226
|
+
-webkit-text-fill-color: #666665;
|
227
|
+
}
|
228
|
+
|
229
|
+
code.literal {
|
230
|
+
/* don't let it affect line spacing */
|
231
|
+
/* disable since M+ 1mn won't interrupt line height */
|
232
|
+
/*line-height: 1;*/
|
233
|
+
/*
|
234
|
+
white-space: nowrap;
|
235
|
+
*/
|
236
|
+
word-wrap: break-word;
|
237
|
+
}
|
238
|
+
|
239
|
+
h1, h2, h3, h4, h5, h6 {
|
240
|
+
font-family: "M+ 1p", sans-serif;
|
241
|
+
font-weight: 400;
|
242
|
+
text-align: left;
|
243
|
+
color: #333332;
|
244
|
+
letter-spacing: -0.01em;
|
245
|
+
/* disable hyphenation, such as in iBooks */
|
246
|
+
-webkit-hyphens: none;
|
247
|
+
/* force super-long words to break */
|
248
|
+
word-break: break-word;
|
249
|
+
|
250
|
+
/* NOTE: Kindle doesn't allow the line-height to be less than the font size (refer to heading font sizes) */
|
251
|
+
line-height: 1.4; /* or 1.2125 */
|
252
|
+
|
253
|
+
margin: 0;
|
254
|
+
padding: 0;
|
255
|
+
|
256
|
+
/* avoiding page breaks does not seem to work in Kindle */
|
257
|
+
-webkit-column-break-inside: avoid;
|
258
|
+
page-break-inside: avoid;
|
259
|
+
-webkit-column-break-after: avoid;
|
260
|
+
page-break-after: avoid;
|
261
|
+
}
|
262
|
+
|
263
|
+
/* Aldiko requires a higher precedence rule to set margin and text-indent, hence the body prefix */
|
264
|
+
/* We'll just use the stronger rule for all paragraph-related stuff to be sure */
|
265
|
+
body p {
|
266
|
+
margin: 1em 0 0 0;
|
267
|
+
text-indent: 0;
|
268
|
+
|
269
|
+
font-family: "Noto Serif", serif;
|
270
|
+
color: #333332;
|
271
|
+
line-height: 1.6;
|
272
|
+
text-align: justify;
|
273
|
+
/* Signal to iBooks that hypens are okay here */
|
274
|
+
-webkit-hyphens: auto;
|
275
|
+
|
276
|
+
widows: 2;
|
277
|
+
orphans: 2;
|
278
|
+
}
|
279
|
+
|
280
|
+
ul, ol, li, dl, dt, dd, footer,
|
281
|
+
div.verse .attribution, table.table th, table.table td {
|
282
|
+
font-family: "Noto Serif", serif;
|
283
|
+
color: #333332;
|
284
|
+
}
|
285
|
+
|
286
|
+
li, dt, dd, footer {
|
287
|
+
line-height: 1.6;
|
288
|
+
}
|
289
|
+
|
290
|
+
figcaption, caption {
|
291
|
+
font-family: "Noto Serif", serif;
|
292
|
+
}
|
293
|
+
|
294
|
+
code, kbd, pre {
|
295
|
+
font-family: "M+ 1mn", monospace;
|
296
|
+
color: #191918;
|
297
|
+
}
|
298
|
+
|
299
|
+
/* QUESTION should we kern preformatted text blocks? */
|
300
|
+
h1, h2, h3, h4, h5, h6,
|
301
|
+
body p, li, dd, blockquote > footer,
|
302
|
+
th, td, figcaption, caption {
|
303
|
+
/* forward-compatible CSS to enable kerning (if we want ligatures, add "liga" and "dlig") */
|
304
|
+
/* WebKits that doesn't recognize these properties don't kern well, hence why we don't just enable kerning via text-rendering */
|
305
|
+
/*text-rendering: optimizeLegibility;*/
|
306
|
+
-webkit-font-feature-settings: "kern";
|
307
|
+
font-feature-settings: "kern";
|
308
|
+
font-kerning: normal;
|
309
|
+
/* NOTE: see Kindle hack in epub3-css3-only.css for additional kerning settings */
|
310
|
+
}
|
311
|
+
|
312
|
+
p.last::after {
|
313
|
+
color: #57AD68;
|
314
|
+
display: inline-block;
|
315
|
+
font-family: "FontAwesome";
|
316
|
+
font-size: 1em;
|
317
|
+
content: "\f121"; /* </> */
|
318
|
+
margin-left: 0.25em;
|
319
|
+
}
|
320
|
+
|
321
|
+
ul li, ol li {
|
322
|
+
/* minimum margin in case there is no paragraph content */
|
323
|
+
margin-top: 0.4em;
|
324
|
+
}
|
325
|
+
|
326
|
+
/* use paragraph-size gaps between list items */
|
327
|
+
.complex > ul > li,
|
328
|
+
.complex > ol > li {
|
329
|
+
margin-top: 1em;
|
330
|
+
}
|
331
|
+
|
332
|
+
/* squeeze content in complex lists */
|
333
|
+
/*
|
334
|
+
li > figure,
|
335
|
+
li > p {
|
336
|
+
margin-top: 0.4em;
|
337
|
+
}
|
338
|
+
*/
|
339
|
+
|
340
|
+
dl {
|
341
|
+
margin-top: 0;
|
342
|
+
margin-bottom: 0;
|
343
|
+
}
|
344
|
+
|
345
|
+
dt {
|
346
|
+
-webkit-column-break-inside: avoid;
|
347
|
+
page-break-inside: avoid;
|
348
|
+
-webkit-column-break-after: avoid;
|
349
|
+
page-break-after: avoid;
|
350
|
+
}
|
351
|
+
|
352
|
+
dt > span.term {
|
353
|
+
font-style: italic;
|
354
|
+
}
|
355
|
+
|
356
|
+
/*
|
357
|
+
dt > span.term > code.literal {
|
358
|
+
font-style: normal;
|
359
|
+
}
|
360
|
+
*/
|
361
|
+
|
362
|
+
dt {
|
363
|
+
margin-top: 0.75em; /* balances 0.25em to term */
|
364
|
+
}
|
365
|
+
|
366
|
+
dl dd {
|
367
|
+
/* minimum margin in case there is no paragraph content */
|
368
|
+
margin-top: 0.25em;
|
369
|
+
}
|
370
|
+
|
371
|
+
div.callout-list {
|
372
|
+
margin-top: 0.5em;
|
373
|
+
}
|
374
|
+
|
375
|
+
div.callout-list ol {
|
376
|
+
font-size: 80%;
|
377
|
+
margin-left: 1.5em !important;
|
378
|
+
list-style-type: none;
|
379
|
+
}
|
380
|
+
|
381
|
+
div.callout-list ol li {
|
382
|
+
text-align: left;
|
383
|
+
}
|
384
|
+
|
385
|
+
i.conum {
|
386
|
+
font-family: "M+ 1mn", monospace;
|
387
|
+
/*text-rendering: geometricPrecision;*/
|
388
|
+
color: #468C54;
|
389
|
+
font-style: normal;
|
390
|
+
}
|
391
|
+
|
392
|
+
pre i.conum {
|
393
|
+
/* don't let it affect line spacing; REVIEW may not need this! */
|
394
|
+
/*line-height: 1;*/
|
395
|
+
}
|
396
|
+
|
397
|
+
div.callout-list li > i.conum {
|
398
|
+
float: left;
|
399
|
+
margin-left: -1.25em;
|
400
|
+
display: block;
|
401
|
+
width: 1.25em;
|
402
|
+
}
|
403
|
+
|
404
|
+
div.itemized-list, div.ordered-list, div.description-list {
|
405
|
+
margin-top: 1em;
|
406
|
+
padding-bottom: 0.25em; /* REVIEW maybe, maybe not */
|
407
|
+
}
|
408
|
+
|
409
|
+
/* QUESTION should we add the class "list" so we can style these generically? */
|
410
|
+
div.itemized-list div.itemized-list,
|
411
|
+
div.itemized-list div.ordered-list,
|
412
|
+
div.itemized-list div.description-list,
|
413
|
+
div.ordered-list div.itemized-list,
|
414
|
+
div.ordered-list div.ordered-list,
|
415
|
+
div.ordered-list div.description-list {
|
416
|
+
margin-top: 0;
|
417
|
+
}
|
418
|
+
|
419
|
+
/*
|
420
|
+
div.description-list div.itemized-list,
|
421
|
+
div.description-list div.ordered-list,
|
422
|
+
div.description-list div.description-list {
|
423
|
+
}
|
424
|
+
*/
|
425
|
+
|
426
|
+
div.itemized-list > h3,
|
427
|
+
div.ordered-list > h3,
|
428
|
+
div.description-list > h3 {
|
429
|
+
font-size: 1em;
|
430
|
+
font-family: "Noto Serif", serif;
|
431
|
+
font-weight: bold;
|
432
|
+
line-height: 1.6;
|
433
|
+
color: #333332;
|
434
|
+
letter-spacing: 0;
|
435
|
+
word-spacing: 0;
|
436
|
+
}
|
437
|
+
|
438
|
+
div.stack li strong.subject,
|
439
|
+
div.stack-subject li strong.subject {
|
440
|
+
display: block;
|
441
|
+
}
|
442
|
+
|
443
|
+
ul {
|
444
|
+
/* QUESTION do we need important here? */
|
445
|
+
margin-left: 1em !important;
|
446
|
+
list-style-type: square;
|
447
|
+
}
|
448
|
+
|
449
|
+
ul ul {
|
450
|
+
list-style-type: circle;
|
451
|
+
}
|
452
|
+
|
453
|
+
ul ul ul {
|
454
|
+
list-style-type: disc;
|
455
|
+
}
|
456
|
+
|
457
|
+
/* disable list style type for CSS3-enabled clients */
|
458
|
+
body:first-of-type ul,
|
459
|
+
body:first-of-type ul ul,
|
460
|
+
body:first-of-type ul ul ul {
|
461
|
+
list-style-type: none;
|
462
|
+
}
|
463
|
+
|
464
|
+
ul > li::before {
|
465
|
+
/*
|
466
|
+
text-rendering: geometricPrecision;
|
467
|
+
*/
|
468
|
+
float: left;
|
469
|
+
margin-left: -1em;
|
470
|
+
margin-top: -0.05em;
|
471
|
+
padding-left: 0.25em;
|
472
|
+
/* guarantee it's out of the flow */
|
473
|
+
width: 0;
|
474
|
+
display: block;
|
475
|
+
}
|
476
|
+
|
477
|
+
ul > li::before {
|
478
|
+
content: "\25AA"; /* small black square */
|
479
|
+
color: #666665;
|
480
|
+
}
|
481
|
+
|
482
|
+
ul ul > li::before {
|
483
|
+
content: "\25E6"; /* small white circle */
|
484
|
+
color: #57AD68;
|
485
|
+
}
|
486
|
+
|
487
|
+
ul ul ul > li::before {
|
488
|
+
content: "\2022"; /* small black circle */
|
489
|
+
color: #666665;
|
490
|
+
}
|
491
|
+
|
492
|
+
ul ul ul ul > li::before {
|
493
|
+
content: "\25AB"; /* small white square */
|
494
|
+
color: #57AD68;
|
495
|
+
}
|
496
|
+
|
497
|
+
ol {
|
498
|
+
margin-left: 1.75em !important;
|
499
|
+
}
|
500
|
+
|
501
|
+
ol {
|
502
|
+
list-style-type: decimal;
|
503
|
+
}
|
504
|
+
|
505
|
+
ol ol {
|
506
|
+
list-style-type: lower-alpha;
|
507
|
+
}
|
508
|
+
|
509
|
+
ol ol ol {
|
510
|
+
list-style-type: lower-roman;
|
511
|
+
}
|
512
|
+
|
513
|
+
/* REVIEW */
|
514
|
+
dd {
|
515
|
+
margin-left: 1.5rem !important;
|
516
|
+
}
|
517
|
+
|
518
|
+
/* Kindle does not justify list-item element, must wrap in nested block element */
|
519
|
+
li > span.principal, dd > span.principal {
|
520
|
+
display: block;
|
521
|
+
text-align: justify;
|
522
|
+
}
|
523
|
+
|
524
|
+
ol.brief > li > span.principal,
|
525
|
+
ul.brief > li > span.principal {
|
526
|
+
text-align: left;
|
527
|
+
}
|
528
|
+
|
529
|
+
/* REVIEW still considering keeping this one */
|
530
|
+
/* disable justify within a link */
|
531
|
+
/*
|
532
|
+
li strong.subject a:link {
|
533
|
+
white-space: pre-wrap;
|
534
|
+
word-spacing: 0.1em;
|
535
|
+
}*/
|
536
|
+
|
537
|
+
/*
|
538
|
+
.bibliography ul li,
|
539
|
+
.references ul li {
|
540
|
+
text-align: left;
|
541
|
+
}
|
542
|
+
*/
|
543
|
+
|
544
|
+
ul.bibliography > li > span.principal,
|
545
|
+
ul.references > li > span.principal {
|
546
|
+
text-align: left;
|
547
|
+
}
|
548
|
+
|
549
|
+
h1, h1 code,
|
550
|
+
h2, h2 code {
|
551
|
+
color: #333332;
|
552
|
+
}
|
553
|
+
|
554
|
+
/* sized based on the major third modular scale (4:5, 16px, 24px) */
|
555
|
+
h1, h2 {
|
556
|
+
font-size: 1.5em;
|
557
|
+
word-spacing: -0.075em;
|
558
|
+
margin-top: 1em; /* 1.5rem */
|
559
|
+
margin-bottom: -0.3333em; /* -0.5rem, 0.5rem to content */
|
560
|
+
}
|
561
|
+
|
562
|
+
h3, h3 code {
|
563
|
+
color: #333332;
|
564
|
+
}
|
565
|
+
|
566
|
+
h3 {
|
567
|
+
font-size: 1.25em;
|
568
|
+
word-spacing: 0;
|
569
|
+
margin-top: 0.84em; /* 1.05rem */
|
570
|
+
margin-bottom: -0.5em; /* -0.625rem, 0.375rem to content */
|
571
|
+
}
|
572
|
+
|
573
|
+
h4, h4 code {
|
574
|
+
color: #4F4F4C;
|
575
|
+
}
|
576
|
+
|
577
|
+
h4 {
|
578
|
+
font-weight: 200;
|
579
|
+
|
580
|
+
font-size: 1.1em;
|
581
|
+
margin-top: 1em; /* 1.1rem */
|
582
|
+
margin-bottom: -0.818em; /* -0.9rem, 0.1rem to content */
|
583
|
+
|
584
|
+
font-size: 1.2em;
|
585
|
+
margin-top: .917em; /* 1.1rem */
|
586
|
+
margin-top: 0.875em; /* 1.05rem */
|
587
|
+
/*margin-bottom: -0.75em;*/ /* -0.9rem, 0.1rem to content */
|
588
|
+
margin-bottom: -0.625em; /* -0.75rem, 0.25rem to content */
|
589
|
+
}
|
590
|
+
|
591
|
+
h5, h5 code {
|
592
|
+
color: #666665;
|
593
|
+
}
|
594
|
+
|
595
|
+
h5 {
|
596
|
+
/*
|
597
|
+
font-size: 1em;
|
598
|
+
text-transform: uppercase;
|
599
|
+
margin-top: 1em;
|
600
|
+
margin-bottom: -1em;
|
601
|
+
*/
|
602
|
+
|
603
|
+
font-size: 0.9em;
|
604
|
+
font-weight: 700;
|
605
|
+
text-transform: uppercase;
|
606
|
+
margin-top: 1.11em; /* 1rem */
|
607
|
+
margin-bottom: -0.972em; /* -0.875rem */
|
608
|
+
}
|
609
|
+
|
610
|
+
h5 code {
|
611
|
+
text-transform: none;
|
612
|
+
}
|
613
|
+
|
614
|
+
/* Kindle strips (or unwraps) <header> tags, so we use an inner div to style */
|
615
|
+
.chapter-header {
|
616
|
+
background-color: #333332;
|
617
|
+
/* NOTE div must have at least 1px top padding for background to fill */
|
618
|
+
padding: 0.75em 1.5em 0.25em 1.5em; /* would like to use 1.5vh 1.5em */
|
619
|
+
margin-bottom: 2.5em;
|
620
|
+
/* TODO maybe what we need to get articles to start in left column
|
621
|
+
-webkit-column-break-before: left;
|
622
|
+
page-break-before: left;
|
623
|
+
*/
|
624
|
+
}
|
625
|
+
|
626
|
+
h1.chapter-title {
|
627
|
+
font-weight: 200;
|
628
|
+
font-size: 1.2em;
|
629
|
+
margin-top: 3.5em; /* 4.2rem - would like to use 9vh */
|
630
|
+
margin-bottom: 0;
|
631
|
+
padding-bottom: 0.8333em; /* 1.2rem */
|
632
|
+
color: #B3B3B1;
|
633
|
+
text-transform: uppercase;
|
634
|
+
word-spacing: -0.075em;
|
635
|
+
letter-spacing: -0.01em;
|
636
|
+
border-bottom: 1px solid #DCDCDE;
|
637
|
+
}
|
638
|
+
|
639
|
+
h1.chapter-title .subtitle {
|
640
|
+
font-weight: 400;
|
641
|
+
color: #FFFFFF;
|
642
|
+
display: block;
|
643
|
+
font-size: 1.5em;
|
644
|
+
margin: 0 0 0 0.75em; /* would like to use 2vw */
|
645
|
+
line-height: 1.2; /* line-height will remain 1.4 on Kindle, see hack in media query */
|
646
|
+
}
|
647
|
+
|
648
|
+
h1.chapter-title em {
|
649
|
+
color: #57AD68;
|
650
|
+
font-style: normal;
|
651
|
+
}
|
652
|
+
|
653
|
+
h1.chapter-title b {
|
654
|
+
font-weight: inherit;
|
655
|
+
}
|
656
|
+
|
657
|
+
.chapter-header p.byline {
|
658
|
+
color: #DCDCDE;
|
659
|
+
/* float left and height 0 takes this line out of the flow */
|
660
|
+
float: left;
|
661
|
+
height: 0;
|
662
|
+
width: 100%;
|
663
|
+
text-align: right;
|
664
|
+
margin-top: 0;
|
665
|
+
line-height: 2;
|
666
|
+
}
|
667
|
+
|
668
|
+
.chapter-header p.byline b {
|
669
|
+
font-weight: normal;
|
670
|
+
padding-left: 0.2em; /* 0.25rem */
|
671
|
+
font-size: 0.8em;
|
672
|
+
line-height: 2.5; /* 2rem */
|
673
|
+
}
|
674
|
+
|
675
|
+
.chapter-header p.byline img {
|
676
|
+
-webkit-border-radius: 0.5em;
|
677
|
+
border-radius: 0.5em;
|
678
|
+
vertical-align: middle;
|
679
|
+
/* some readers like to resize images; we don't want the author images resized */
|
680
|
+
height: 2em !important;
|
681
|
+
width: 2em !important;
|
682
|
+
}
|
683
|
+
|
684
|
+
div.abstract {
|
685
|
+
margin: 5% 1.5em 2.5em 1.5em;
|
686
|
+
}
|
687
|
+
|
688
|
+
div.abstract > p {
|
689
|
+
color: #666665;
|
690
|
+
font-size: 1.05em; /* or 1.1em? */
|
691
|
+
line-height: 1.75;
|
692
|
+
}
|
693
|
+
|
694
|
+
div.abstract > p a:link {
|
695
|
+
color: #666665;
|
696
|
+
/* hack for font color in iBooks */
|
697
|
+
-webkit-text-fill-color: #666665;
|
698
|
+
}
|
699
|
+
|
700
|
+
div.abstract > p:first-child::first-line {
|
701
|
+
font-weight: bold;
|
702
|
+
-webkit-font-feature-settings: "kern" off;
|
703
|
+
font-feature-settings: "kern" off;
|
704
|
+
font-kerning: none;
|
705
|
+
/* and for Kindle... */
|
706
|
+
text-rendering: optimizeSpeed;
|
707
|
+
}
|
708
|
+
|
709
|
+
div.abstract p strong {
|
710
|
+
font-weight: inherit;
|
711
|
+
font-style: italic;
|
712
|
+
}
|
713
|
+
|
714
|
+
p.lead {
|
715
|
+
font-size: 1.05em;
|
716
|
+
line-height: 1.75;
|
717
|
+
}
|
718
|
+
|
719
|
+
hr.thematicbreak {
|
720
|
+
display: none;
|
721
|
+
}
|
722
|
+
|
723
|
+
hr.thematicbreak + p {
|
724
|
+
margin-top: 1.5em;
|
725
|
+
}
|
726
|
+
|
727
|
+
/* TODO finish layout of first-letter */
|
728
|
+
hr.thematicbreak + p::first-letter {
|
729
|
+
font-size: 200%;
|
730
|
+
}
|
731
|
+
|
732
|
+
p.stack > strong.head,
|
733
|
+
p.stack-head > strong.head {
|
734
|
+
display: block;
|
735
|
+
}
|
736
|
+
|
737
|
+
p.signature {
|
738
|
+
font-size: 0.9em;
|
739
|
+
}
|
740
|
+
|
741
|
+
figure,
|
742
|
+
aside.sidebar {
|
743
|
+
margin-top: 1em;
|
744
|
+
}
|
745
|
+
|
746
|
+
/*
|
747
|
+
aside.sidebar {
|
748
|
+
-webkit-column-break-inside: avoid;
|
749
|
+
page-break-inside: avoid;
|
750
|
+
float: left;
|
751
|
+
margin-bottom: 1em;
|
752
|
+
}
|
753
|
+
*/
|
754
|
+
|
755
|
+
figure.image {
|
756
|
+
-webkit-column-break-inside: avoid;
|
757
|
+
page-break-inside: avoid;
|
758
|
+
}
|
759
|
+
|
760
|
+
figure.image img {
|
761
|
+
max-width: 100%;
|
762
|
+
}
|
763
|
+
|
764
|
+
figure.coalesce {
|
765
|
+
-webkit-column-break-inside: avoid;
|
766
|
+
page-break-inside: avoid;
|
767
|
+
}
|
768
|
+
|
769
|
+
figcaption,
|
770
|
+
caption {
|
771
|
+
font-size: 0.9em;
|
772
|
+
font-style: italic;
|
773
|
+
color: #666665;
|
774
|
+
letter-spacing: -0.01em;
|
775
|
+
line-height: 1.4;
|
776
|
+
text-align: left;
|
777
|
+
padding-left: 0.1em;
|
778
|
+
page-break-inside: avoid;
|
779
|
+
-webkit-column-break-after: avoid;
|
780
|
+
page-break-after: avoid;
|
781
|
+
}
|
782
|
+
|
783
|
+
figure.image figcaption {
|
784
|
+
padding-left: 0;
|
785
|
+
margin-top: 0.2em;
|
786
|
+
-webkit-column-break-after: auto;
|
787
|
+
page-break-after: auto;
|
788
|
+
}
|
789
|
+
|
790
|
+
p + figure.listing,
|
791
|
+
span.principal + figure.listing {
|
792
|
+
margin-top: 0.75em; /* 0.75rem */
|
793
|
+
}
|
794
|
+
|
795
|
+
figure.listing > pre {
|
796
|
+
margin-top: 0;
|
797
|
+
}
|
798
|
+
|
799
|
+
/* REVIEW TODO put margin bottom on the figcaption instead */
|
800
|
+
figure.listing > figcaption + pre {
|
801
|
+
margin-top: 0.294em; /* 0.25rem */
|
802
|
+
}
|
803
|
+
|
804
|
+
aside.sidebar {
|
805
|
+
border: 1px solid #B3B3B1;
|
806
|
+
padding: 0 1.5em;
|
807
|
+
font-size: 0.9em;
|
808
|
+
background-color: #F2F2F2;
|
809
|
+
text-align: right; /* aligns heading to right */
|
810
|
+
/*
|
811
|
+
-webkit-box-shadow: 0px 1px 1px rgba(102, 102, 101, 0.15);
|
812
|
+
box-shadow: 0px 1px 1px rgba(102, 102, 101, 0.15);
|
813
|
+
*/
|
814
|
+
}
|
815
|
+
|
816
|
+
body:first-of-type aside.sidebar {
|
817
|
+
background-color: rgba(0, 0, 0, 0.05); /* using transparency is night-mode friendly */
|
818
|
+
/*background-color: rgba(51, 51, 50, 0.06);*/ /* using transparency is night-mode friendly */
|
819
|
+
}
|
820
|
+
|
821
|
+
/* a bit of a cheat; could use aside.sidebar[title] instead, but not on Aldiko */
|
822
|
+
aside.sidebar.titled {
|
823
|
+
margin-top: 2em;
|
824
|
+
}
|
825
|
+
|
826
|
+
aside.sidebar > h2 {
|
827
|
+
/*text-transform: uppercase;*/ /* uppercase done manually to support Aldiko */
|
828
|
+
font-size: 1em;
|
829
|
+
/*
|
830
|
+
font-weight: 700;
|
831
|
+
*/
|
832
|
+
font-weight: 400;
|
833
|
+
letter-spacing: 0;
|
834
|
+
display: inline-block;
|
835
|
+
white-space: nowrap; /* for some reason it's wrapping prematurely */
|
836
|
+
border: 1px solid #B3B3B1;
|
837
|
+
padding: 1.5em .75em .5em .75em;
|
838
|
+
margin: -1em 0.5em -0.25em 0.5em;
|
839
|
+
background-color: #FFFFFF;
|
840
|
+
/*
|
841
|
+
-webkit-box-shadow: 0px 1px 1px rgba(102, 102, 101, 0.1);
|
842
|
+
box-shadow: 0px 1px 1px rgba(102, 102, 101, 0.1);
|
843
|
+
*/
|
844
|
+
}
|
845
|
+
|
846
|
+
/* doesn't work
|
847
|
+
body:first-of-type aside.sidebar > h2 {
|
848
|
+
background-color: rgba(255, 255, 255, 1);
|
849
|
+
}
|
850
|
+
*/
|
851
|
+
|
852
|
+
aside.sidebar > div.content {
|
853
|
+
margin-bottom: 1em;
|
854
|
+
text-align: justify; /* restore text alignment in content */
|
855
|
+
}
|
856
|
+
|
857
|
+
/* QUESTION same for ordered-list? */
|
858
|
+
aside.sidebar > div.content > div.itemized-list > ul {
|
859
|
+
margin-left: 0.5em !important;
|
860
|
+
}
|
861
|
+
|
862
|
+
div.blockquote {
|
863
|
+
padding: 0 1em;
|
864
|
+
margin: 1.25em auto;
|
865
|
+
}
|
866
|
+
|
867
|
+
/* display: table causes quotes to be repeated in Aldiko, so we hide this part */
|
868
|
+
div[class~="blockquote"] {
|
869
|
+
display: table;
|
870
|
+
}
|
871
|
+
|
872
|
+
blockquote > p {
|
873
|
+
color: #191918;
|
874
|
+
font-style: italic;
|
875
|
+
|
876
|
+
/*
|
877
|
+
font-size: 1.2em;
|
878
|
+
word-spacing: 0.1em;
|
879
|
+
*/
|
880
|
+
|
881
|
+
font-size: 1.15em;
|
882
|
+
word-spacing: 0.1em;
|
883
|
+
|
884
|
+
margin-top: 0;
|
885
|
+
line-height: 1.75;
|
886
|
+
}
|
887
|
+
|
888
|
+
/* hide explicit open quote for CSS3-enabled clients */
|
889
|
+
blockquote span.open-quote:not(:empty) {
|
890
|
+
display: none;
|
891
|
+
}
|
892
|
+
|
893
|
+
/* NOTE if we mapped the font icon to "\201c", we could just style the .open-quote */
|
894
|
+
blockquote > p:first-of-type::before {
|
895
|
+
display: inline-block;
|
896
|
+
color: #666665;
|
897
|
+
text-shadow: 0 1px 2px rgba(102, 102, 101, 0.3);
|
898
|
+
|
899
|
+
/* using serif quote from entypo */
|
900
|
+
font-family: "FontIcons";
|
901
|
+
|
902
|
+
/*content: "\f10e";*/ /* quote-right from Entypo */
|
903
|
+
/*
|
904
|
+
-webkit-transform: rotate(180deg);
|
905
|
+
transform: rotate(180deg);
|
906
|
+
padding-left: .3em;
|
907
|
+
padding-right: .2em;
|
908
|
+
*/
|
909
|
+
|
910
|
+
content: "\f10d"; /* quote-left, a flipped version of the quote-right from Entypo */
|
911
|
+
padding-right: .5em;
|
912
|
+
font-size: 1.5em;
|
913
|
+
line-height: 1.3em;
|
914
|
+
margin-top: -0.5em;
|
915
|
+
vertical-align: text-bottom;
|
916
|
+
}
|
917
|
+
|
918
|
+
blockquote footer {
|
919
|
+
font-size: 0.9em;
|
920
|
+
font-style: italic;
|
921
|
+
|
922
|
+
margin-top: 0.5rem;
|
923
|
+
text-align: right;
|
924
|
+
}
|
925
|
+
|
926
|
+
blockquote footer .context {
|
927
|
+
font-size: 0.9em;
|
928
|
+
letter-spacing: -0.1em;
|
929
|
+
color: #666665;
|
930
|
+
}
|
931
|
+
|
932
|
+
/* Kindle requires text-align: center on surrounding div to align image to center */
|
933
|
+
figure.image div.content {
|
934
|
+
text-align: center;
|
935
|
+
}
|
936
|
+
|
937
|
+
/* in the event the viewer adds display: block to the image */
|
938
|
+
figure.image img {
|
939
|
+
/* max-width not supported in Kindle, need to use a media query to add */
|
940
|
+
/*max-width: 95%;*/
|
941
|
+
margin: 0 auto;
|
942
|
+
}
|
943
|
+
|
944
|
+
pre {
|
945
|
+
margin-top: 1em; /* 0.85rem */
|
946
|
+
/*margin-top: 1.176em;*/ /* 1rem */
|
947
|
+
white-space: pre-wrap;
|
948
|
+
word-wrap: break-word;
|
949
|
+
font-size: 0.85em;
|
950
|
+
line-height: 1.4; /* matches what Kindle uses and can't go less */
|
951
|
+
background-color: #F2F2F2;
|
952
|
+
padding: 0.5rem 0.75rem;
|
953
|
+
/*
|
954
|
+
border-top: 3px solid #DCDCDE;
|
955
|
+
*/
|
956
|
+
/* QUESTION #B3B3B1? */
|
957
|
+
border-top: 1px solid #DCDCDE;
|
958
|
+
border-right: 1px solid #DCDCDE;
|
959
|
+
}
|
960
|
+
|
961
|
+
body:first-of-type pre {
|
962
|
+
background-color: rgba(0, 0, 0, 0.05); /* using transparency is night-mode friendly */
|
963
|
+
/*background-color: rgba(51, 51, 50, 0.06);*/ /* using transparency is night-mode friendly */
|
964
|
+
}
|
965
|
+
|
966
|
+
/* TODO what we really want is for pre w/o caption to be unbreakable */
|
967
|
+
pre.screen {
|
968
|
+
/*
|
969
|
+
-webkit-column-break-inside: avoid;
|
970
|
+
page-break-inside: avoid;
|
971
|
+
*/
|
972
|
+
orphans: 3;
|
973
|
+
widows: 3; /* widows doesn't seem to work here */
|
974
|
+
}
|
975
|
+
|
976
|
+
pre.source {
|
977
|
+
orphans: 3;
|
978
|
+
widows: 3; /* widows doesn't seem to work here */
|
979
|
+
}
|
980
|
+
|
981
|
+
div.verse {
|
982
|
+
-webkit-column-break-inside: avoid;
|
983
|
+
page-break-inside: avoid;
|
984
|
+
}
|
985
|
+
|
986
|
+
div.verse > pre {
|
987
|
+
background-color: transparent;
|
988
|
+
border: none;
|
989
|
+
font-size: 1.2em;
|
990
|
+
text-align: center;
|
991
|
+
}
|
992
|
+
|
993
|
+
div.verse .attribution {
|
994
|
+
display: block;
|
995
|
+
margin-top: 1.4em;
|
996
|
+
}
|
997
|
+
|
998
|
+
aside.admonition {
|
999
|
+
margin-top: 1em;
|
1000
|
+
padding: 1em;
|
1001
|
+
border-left: 0.5em solid transparent;
|
1002
|
+
-webkit-column-break-inside: avoid;
|
1003
|
+
page-break-inside: avoid;
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
/* overrides for CSS3-enabled clients */
|
1007
|
+
aside[class~="admonition"] {
|
1008
|
+
margin: 1.5em 2em; /* even if admonition is at bottom of block, we want that extra space below */
|
1009
|
+
padding: 0;
|
1010
|
+
border-width: 0;
|
1011
|
+
background: none !important;
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
aside.note {
|
1015
|
+
border-left-color: #B3B3B1;
|
1016
|
+
background-color: #E1E1E1; /* 25% opacity of border */
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
aside.tip {
|
1020
|
+
border-left-color: #57AD68;
|
1021
|
+
background-color: #D4EAD9; /* 25% opacity of border */
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
aside.caution {
|
1025
|
+
border-left-color: #666665;
|
1026
|
+
background-color: #D8D8D8; /* 25% opacity of border */
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
aside.warning {
|
1030
|
+
border-left-color: #C83737;
|
1031
|
+
background-color: #F1CCCC; /* 25% opacity of border */
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
aside.important {
|
1035
|
+
border-left-color: #FFC14F;
|
1036
|
+
background-color: #FFEFD2; /* 25% opacity of border */
|
1037
|
+
}
|
1038
|
+
|
1039
|
+
aside.admonition::before {
|
1040
|
+
display: block;
|
1041
|
+
font-family: "FontAwesome";
|
1042
|
+
font-size: 2em;
|
1043
|
+
line-height: 1em;
|
1044
|
+
width: 1em;
|
1045
|
+
text-align: center;
|
1046
|
+
margin-bottom: -0.25em;
|
1047
|
+
margin-left: -0.5em;
|
1048
|
+
text-shadow: 0px 1px 2px rgba(102, 102, 101, 0.3);
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
aside.admonition > div.content {
|
1052
|
+
font-size: 90%;
|
1053
|
+
margin-top: -1em; /* prevent at top of content when using block form of admonition */
|
1054
|
+
}
|
1055
|
+
|
1056
|
+
aside[class~="admonition"] > div[class~="content"] {
|
1057
|
+
margin-top: 0;
|
1058
|
+
padding-bottom: 1em;
|
1059
|
+
background-size: 100% 1px;
|
1060
|
+
background-repeat: no-repeat;
|
1061
|
+
background-position: 0 bottom;
|
1062
|
+
/* template
|
1063
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 42.5%, <color> 45%, <color> 55%, rgba(255,255,255,0) 57.5%);
|
1064
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 42.5%, <color> 45%, <color> 55%, rgba(255,255,255,0) 57.5%);
|
1065
|
+
*/
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
aside.note::before {
|
1069
|
+
/*content: "\f0f4";*/ /* fa-coffee */
|
1070
|
+
content: "\f040"; /* fa-pencil */
|
1071
|
+
color: #B3B3B1; /* 179,179,177 */
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
aside[class~="note"] > div[class~="content"] {
|
1075
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 42.5%, #B3B3B1 45%, #B3B3B1 55%, rgba(255,255,255,0) 57.5%);
|
1076
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 42.5%, #B3B3B1 45%, #B3B3B1 55%, rgba(255,255,255,0) 57.5%);
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
aside.tip::before {
|
1080
|
+
/*content: "\f069";*/ /* fa-asterisk */
|
1081
|
+
/*content: "\f0d6";*/ /* fa-money */
|
1082
|
+
content: "\f15a"; /* fa-bitcoin */
|
1083
|
+
color: #57AD68; /* 87,173,104 */
|
1084
|
+
}
|
1085
|
+
|
1086
|
+
aside[class~="tip"] > div[class~="content"] {
|
1087
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 42.5%, #57AD68 45%, #57AD68 55%, rgba(255,255,255,0) 57.5%);
|
1088
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 42.5%, #57AD68 45%, #57AD68 55%, rgba(255,255,255,0) 57.5%);
|
1089
|
+
}
|
1090
|
+
|
1091
|
+
aside.caution::before {
|
1092
|
+
content: "\f0c2"; /* fa-cloud */
|
1093
|
+
color: #666665; /* 102,102,101 */
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
aside[class~="caution"] > div[class~="content"] {
|
1097
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 42.5%, #666665 45%, #666665 55%, rgba(255,255,255,0) 57.5%);
|
1098
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 42.5%, #666665 45%, #666665 55%, rgba(255,255,255,0) 57.5%);
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
aside.warning::before {
|
1102
|
+
content: "\f0e7"; /* fa-bolt */
|
1103
|
+
color: #C83737; /* 200,55,55 */
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
aside[class~="warning"] > div[class~="content"] {
|
1107
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 42.5%, #C83737 45%, #C83737 55%, rgba(255,255,255,0) 57.5%);
|
1108
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 42.5%, #C83737 45%, #C83737 55%, rgba(255,255,255,0) 57.5%);
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
aside.important::before {
|
1112
|
+
content: "\f12a"; /* fa-exclamation */
|
1113
|
+
color: #FFC14F; /* 255,193,79 */
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
aside[class~="important"] > div[class~="content"] {
|
1117
|
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0) 42.5%, #FFC14F 45%, #FFC14F 55%, rgba(255,255,255,0) 57.5%);
|
1118
|
+
background-image: linear-gradient(to right, rgba(255,255,255,0) 42.5%, #FFC14F 45%, #FFC14F 55%, rgba(255,255,255,0) 57.5%);
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
aside.admonition > h2 {
|
1122
|
+
margin-top: 0;
|
1123
|
+
margin-bottom: 1.5em;
|
1124
|
+
font-size: 1em;
|
1125
|
+
text-align: center;
|
1126
|
+
}
|
1127
|
+
|
1128
|
+
aside[class~="admonition"] > h2 {
|
1129
|
+
float: left;
|
1130
|
+
width: 100%;
|
1131
|
+
margin-top: -1.25em;
|
1132
|
+
margin-bottom: 0;
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
div.table {
|
1136
|
+
margin-top: 1em;
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
table.table thead,
|
1140
|
+
table.table tbody,
|
1141
|
+
table.table tfoot {
|
1142
|
+
font-size: 0.8em;
|
1143
|
+
}
|
1144
|
+
|
1145
|
+
table.table > caption {
|
1146
|
+
padding-bottom: 0.1em;
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
table.table th,
|
1150
|
+
table.table td {
|
1151
|
+
line-height: 1.4;
|
1152
|
+
padding: 0.5em 0.5em 1em 0.1em;
|
1153
|
+
vertical-align: top;
|
1154
|
+
text-align: left;
|
1155
|
+
-webkit-column-break-inside: avoid;
|
1156
|
+
page-break-inside: avoid;
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
table.table th {
|
1160
|
+
font-weight: bold;
|
1161
|
+
}
|
1162
|
+
|
1163
|
+
table.table thead th {
|
1164
|
+
border-bottom: 1px solid #80807F;
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
table.table td > p {
|
1168
|
+
margin-top: 0;
|
1169
|
+
text-align: left;
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
/* REVIEW */
|
1173
|
+
table.table td > p + p {
|
1174
|
+
margin-top: 1em;
|
1175
|
+
}
|
1176
|
+
|
1177
|
+
table.table-framed {
|
1178
|
+
border-width: 1px;
|
1179
|
+
border-style: solid;
|
1180
|
+
border-color: #80807F;
|
1181
|
+
}
|
1182
|
+
|
1183
|
+
table.table-framed-topbot {
|
1184
|
+
border-width: 1px 0;
|
1185
|
+
border-style: solid;
|
1186
|
+
border-color: #80807F;
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
table.table-framed-sides {
|
1190
|
+
border-width: 0 1px;
|
1191
|
+
border-style: solid;
|
1192
|
+
border-color: #80807F;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
table.table-grid th,
|
1196
|
+
table.table-grid td {
|
1197
|
+
border-width: 0 1px 1px 0;
|
1198
|
+
border-style: solid;
|
1199
|
+
border-color: #80807F;
|
1200
|
+
}
|
1201
|
+
|
1202
|
+
table.table-grid thead tr > *:last-child {
|
1203
|
+
border-right-width: 0;
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
table.table-grid tbody tr:last-child > th,
|
1207
|
+
table.table-grid tbody tr:last-child > td {
|
1208
|
+
border-bottom-width: 0;
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
table.table-grid-rows tbody th,
|
1212
|
+
table.table-grid-rows tbody td {
|
1213
|
+
border-width: 1px 0 0 0;
|
1214
|
+
border-style: solid;
|
1215
|
+
border-color: #80807F;
|
1216
|
+
}
|
1217
|
+
|
1218
|
+
table.table-grid-cols th,
|
1219
|
+
table.table-grid-cols td {
|
1220
|
+
border-width: 0 1px 0 0;
|
1221
|
+
border-style: solid;
|
1222
|
+
border-color: #80807F;
|
1223
|
+
}
|
1224
|
+
|
1225
|
+
table.table-grid-cols thead th:last-child {
|
1226
|
+
border-right-width: 0;
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
table.table-grid-cols tbody tr > td:last-child {
|
1230
|
+
border-right-width: 0;
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
hr.pagebreak {
|
1234
|
+
-webkit-column-break-after: always;
|
1235
|
+
page-break-after: always;
|
1236
|
+
border: none;
|
1237
|
+
margin: 0;
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
/* REVIEW */
|
1241
|
+
hr.pagebreak + * {
|
1242
|
+
margin-top: 0 !important;
|
1243
|
+
}
|
1244
|
+
|
1245
|
+
#_about_the_author {
|
1246
|
+
-webkit-column-break-before: always;
|
1247
|
+
page-break-before: always;
|
1248
|
+
border-bottom: 1px solid #B3B3B3;
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
img.headshot {
|
1252
|
+
float: left;
|
1253
|
+
border: 1px solid #80807F;
|
1254
|
+
padding: 1px;
|
1255
|
+
margin: 0.35em 1em 0.15em 0;
|
1256
|
+
height: 5em !important;
|
1257
|
+
width: 5em !important;
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
/* Kindle refuses to style footer (perhaps stripped), so we use an explicit class */
|
1261
|
+
.chapter-footer {
|
1262
|
+
-webkit-column-break-before: always;
|
1263
|
+
page-break-before: always;
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
div.footnotes {
|
1267
|
+
margin-top: 1em;
|
1268
|
+
}
|
1269
|
+
|
1270
|
+
div.footnotes p {
|
1271
|
+
font-size: 0.8rem;
|
1272
|
+
margin-top: 0.4rem;
|
1273
|
+
}
|
1274
|
+
|
1275
|
+
div.footnotes sup.noteref {
|
1276
|
+
font-weight: bold;
|
1277
|
+
font-size: 0.9em;
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
/*div.footnotes sup.noteref a {*/
|
1281
|
+
sup.noteref a {
|
1282
|
+
/* Kindle wants to underline these links */
|
1283
|
+
text-decoration: none !important;
|
1284
|
+
background-image: none;
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
nav#toc ol {
|
1288
|
+
list-style-type: none;
|
1289
|
+
}
|
1290
|
+
|
1291
|
+
.icon {
|
1292
|
+
display: none;
|
1293
|
+
}
|