asciidoctor-epub3 1.5.0.alpha.15 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +48 -0
- data/Gemfile +3 -4
- data/LICENSE +2 -2
- data/NOTICE.adoc +1 -1
- data/README.adoc +50 -763
- data/asciidoctor-epub3.gemspec +7 -5
- data/data/fonts/awesome/fa-solid-900.ttf +0 -0
- data/data/fonts/awesome/icons.yml +873 -26
- data/data/styles/color-palette.css +7 -10
- data/data/styles/epub3-css3-only.css +0 -50
- data/data/styles/epub3.css +72 -68
- data/lib/asciidoctor-epub3/converter.rb +374 -174
- data/lib/asciidoctor-epub3/ext/asciidoctor.rb +1 -0
- data/lib/asciidoctor-epub3/ext/asciidoctor/document.rb +19 -0
- data/lib/asciidoctor-epub3/version.rb +1 -1
- metadata +44 -15
@@ -1,14 +1,11 @@
|
|
1
1
|
.palette-grayscale {
|
2
|
-
color: #
|
3
|
-
color: #
|
4
|
-
color: #
|
5
|
-
/*
|
6
|
-
color: #
|
7
|
-
color: #
|
8
|
-
color: #
|
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 */
|
2
|
+
color: #000000; /* black :: body text, heading default */
|
3
|
+
color: #101010; /* off-black :: code, literal, blockquote text */
|
4
|
+
color: #202020; /* deep gray :: h4 */
|
5
|
+
color: #333332; /* dark gray :: h5, visited link, list bullets, abstract, caption, open quote */
|
6
|
+
color: #707070; /* medium gray :: table borders */
|
7
|
+
color: #C8C8C8; /* gray :: footer subtitle, sidebar border */
|
8
|
+
color: #E0E0E0; /* off white :: pre background, sidebar background */
|
12
9
|
color: #FFFFFF; /* white :: chapter subtitle */
|
13
10
|
}
|
14
11
|
|
@@ -75,23 +75,6 @@ body code, body kbd, body pre, pre :not(code) {
|
|
75
75
|
th, td, figcaption, caption {
|
76
76
|
text-rendering: optimizeLegibility;
|
77
77
|
}*/
|
78
|
-
/* hack line height of subtitle using floats on Kindle */
|
79
|
-
h1.chapter-title .subtitle {
|
80
|
-
margin-top: -0.2em;
|
81
|
-
margin-bottom: 0.3em; /* compensate for reduced line height */
|
82
|
-
}
|
83
|
-
|
84
|
-
/* NOTE using b instead of span since Firefox ePubReader applies immutable styles to span */
|
85
|
-
h1.chapter-title .subtitle > b {
|
86
|
-
float: left;
|
87
|
-
display: inline-block;
|
88
|
-
margin-bottom: -0.3em; /* reduce the line height */
|
89
|
-
padding-right: 0.2em; /* spacing between words */
|
90
|
-
}
|
91
|
-
|
92
|
-
h1.chapter-title .subtitle > b:last-child {
|
93
|
-
padding-right: 0;
|
94
|
-
}
|
95
78
|
|
96
79
|
h1.chapter-title .subtitle::after {
|
97
80
|
display: table;
|
@@ -100,39 +83,6 @@ body code, body kbd, body pre, pre :not(code) {
|
|
100
83
|
}
|
101
84
|
}
|
102
85
|
|
103
|
-
/* Use darker font colors on Kindle Paperwhite */
|
104
|
-
@media amzn-kf8 and (device-height: 1024px) and (device-width: 758px), amzn-kf8 and (device-height: 758px) and (device-width: 1024px) {
|
105
|
-
body p,
|
106
|
-
div.abstract > p,
|
107
|
-
ul, ol, li, dl, dt, dd, footer,
|
108
|
-
div.verse .attribution, table.table th, table.table td,
|
109
|
-
figcaption, caption,
|
110
|
-
h1, h2, h3, h4, h5 {
|
111
|
-
color: #000000;
|
112
|
-
}
|
113
|
-
|
114
|
-
body a:link,
|
115
|
-
div.abstract > p a:link {
|
116
|
-
color: #000000;
|
117
|
-
-webkit-text-fill-color: #000000;
|
118
|
-
}
|
119
|
-
|
120
|
-
body a:visited {
|
121
|
-
color: #333332;
|
122
|
-
-webkit-text-fill-color: #333332;
|
123
|
-
}
|
124
|
-
|
125
|
-
.chapter-header {
|
126
|
-
color: #191918;
|
127
|
-
border-bottom-color: #191918;
|
128
|
-
}
|
129
|
-
|
130
|
-
h1.chapter-title .subtitle,
|
131
|
-
.chapter-header p.byline {
|
132
|
-
color: #000000;
|
133
|
-
}
|
134
|
-
}
|
135
|
-
|
136
86
|
.chapter-header p.byline {
|
137
87
|
height: auto; /* Aldiko requires this value to be 0; reset it for all others */
|
138
88
|
}
|
data/data/styles/epub3.css
CHANGED
@@ -17,7 +17,6 @@ html {
|
|
17
17
|
/* set the em base (and relative em anchor) by setting the font-size on html */
|
18
18
|
/* TODO set font-size > 100% except for Kindle */
|
19
19
|
font-size: 100%;
|
20
|
-
-webkit-text-size-adjust: 100%;
|
21
20
|
}
|
22
21
|
|
23
22
|
/* don't set margin on body as that's how many readers frame reading area */
|
@@ -81,8 +80,8 @@ b, strong {
|
|
81
80
|
|
82
81
|
b.button {
|
83
82
|
font-weight: normal;
|
84
|
-
text-shadow: 1px 0 0 #
|
85
|
-
color: #
|
83
|
+
text-shadow: 1px 0 0 #333332;
|
84
|
+
color: #101010;
|
86
85
|
white-space: nowrap;
|
87
86
|
}
|
88
87
|
|
@@ -143,7 +142,7 @@ img {
|
|
143
142
|
|
144
143
|
mark {
|
145
144
|
background-color: #FFC14F;
|
146
|
-
color: #
|
145
|
+
color: #101010;
|
147
146
|
}
|
148
147
|
|
149
148
|
small {
|
@@ -198,14 +197,36 @@ td, th {
|
|
198
197
|
padding: 0;
|
199
198
|
}
|
200
199
|
|
200
|
+
/* We need to apply text-align to <p> too in order to override global text-align:justify */
|
201
|
+
th.halign-left, td.halign-left, th.halign-left > p, td.halign-left > p {
|
202
|
+
text-align: left
|
203
|
+
}
|
204
|
+
|
205
|
+
th.halign-right, td.halign-right, th.halign-right > p, td.halign-right > p {
|
206
|
+
text-align: right
|
207
|
+
}
|
208
|
+
|
209
|
+
th.halign-center, td.halign-center, th.halign-center > p, td.halign-center > p {
|
210
|
+
text-align: center
|
211
|
+
}
|
212
|
+
|
213
|
+
th.valign-top, td.valign-top, th.valign-top > p, td.valign-top > p {
|
214
|
+
vertical-align: top
|
215
|
+
}
|
216
|
+
|
217
|
+
th.valign-bottom, td.valign-bottom, th.valign-bottom > p, td.valign-bottom > p {
|
218
|
+
vertical-align: bottom
|
219
|
+
}
|
220
|
+
|
221
|
+
th.valign-middle, td.valign-middle, th.valign-middle > p, td.valign-middle > p {
|
222
|
+
vertical-align: middle
|
223
|
+
}
|
224
|
+
|
201
225
|
body a:link {
|
202
|
-
color: #333332;
|
203
|
-
/* hack for font color in iBooks and Gitden (though Gitden would accept color !important too) */
|
204
|
-
-webkit-text-fill-color: #333332;
|
205
226
|
/* Kindle requires the !important on text-decoration */
|
206
227
|
/* In night mode, the only indicator of a link is the underline, so we need it or a background image */
|
207
228
|
text-decoration: none !important;
|
208
|
-
border-bottom: 1px dashed #
|
229
|
+
border-bottom: 1px dashed #333332;
|
209
230
|
/* allow URLs to break anywhere if they don't fit on a line; but how do we know it's a URL? */
|
210
231
|
/*
|
211
232
|
word-break: break-all;
|
@@ -221,12 +242,6 @@ body:first-of-type a:link {
|
|
221
242
|
background-position: 0 1.2em;
|
222
243
|
}
|
223
244
|
|
224
|
-
body a:visited {
|
225
|
-
color: #666665;
|
226
|
-
/* hack for font color in iBooks */
|
227
|
-
-webkit-text-fill-color: #666665;
|
228
|
-
}
|
229
|
-
|
230
245
|
code.literal {
|
231
246
|
/* don't let it affect line spacing */
|
232
247
|
/* disable since M+ 1mn won't interrupt line height */
|
@@ -270,7 +285,6 @@ body p,
|
|
270
285
|
ul, ol, li, dl, dt, dd, footer,
|
271
286
|
div.verse .attribution, table.table th, table.table td,
|
272
287
|
figcaption, caption {
|
273
|
-
color: #333332;
|
274
288
|
/* NOTE iBooks will forcefully override font-family of text inside div, p and span elements when font other than Original is selected */
|
275
289
|
/* NOTE iBooks honors Original font for prose text if declared in display-options.xml */
|
276
290
|
font-family: "Noto Serif", serif;
|
@@ -281,7 +295,7 @@ body p, li, dt, dd, footer {
|
|
281
295
|
}
|
282
296
|
|
283
297
|
code, kbd, pre {
|
284
|
-
color: #
|
298
|
+
color: #101010;
|
285
299
|
font-family: "M+ 1mn", monospace;
|
286
300
|
-webkit-hyphens: none; /* disable hyphenation where supported (e.g., iBooks) */
|
287
301
|
}
|
@@ -357,6 +371,11 @@ dl dd {
|
|
357
371
|
margin-top: 0.25em;
|
358
372
|
}
|
359
373
|
|
374
|
+
td.hdlist1 {
|
375
|
+
font-weight: bold;
|
376
|
+
padding-right: 0.625em;
|
377
|
+
}
|
378
|
+
|
360
379
|
div.callout-list {
|
361
380
|
margin-top: 0.5em;
|
362
381
|
}
|
@@ -457,7 +476,7 @@ ul > li::before {
|
|
457
476
|
|
458
477
|
ul > li::before {
|
459
478
|
content: "\25AA"; /* small black square */
|
460
|
-
color: #
|
479
|
+
color: #333332;
|
461
480
|
}
|
462
481
|
|
463
482
|
ul ul > li::before {
|
@@ -467,7 +486,7 @@ ul ul > li::before {
|
|
467
486
|
|
468
487
|
ul ul ul > li::before {
|
469
488
|
content: "\2022"; /* small black circle */
|
470
|
-
color: #
|
489
|
+
color: #333332;
|
471
490
|
}
|
472
491
|
|
473
492
|
ul ul ul ul > li::before {
|
@@ -529,7 +548,6 @@ ul.references > li > span.principal {
|
|
529
548
|
|
530
549
|
/* sized based on the major third modular scale (4:5, 16px, 24px) */
|
531
550
|
h1, h2 {
|
532
|
-
color: #333332;
|
533
551
|
font-size: 1.5em;
|
534
552
|
word-spacing: -0.075em;
|
535
553
|
margin-top: 1em; /* 1.5rem */
|
@@ -537,14 +555,13 @@ h1, h2 {
|
|
537
555
|
}
|
538
556
|
|
539
557
|
h3 {
|
540
|
-
color: #333332;
|
541
558
|
font-size: 1.25em;
|
542
559
|
margin-top: 0.84em; /* 1.05rem */
|
543
560
|
margin-bottom: -0.5em; /* -0.625rem, 0.375rem to content */
|
544
561
|
}
|
545
562
|
|
546
563
|
h4 {
|
547
|
-
color: #
|
564
|
+
color: #202020;
|
548
565
|
font-weight: 200;
|
549
566
|
|
550
567
|
font-size: 1.1em;
|
@@ -559,7 +576,7 @@ h4 {
|
|
559
576
|
}
|
560
577
|
|
561
578
|
h5 {
|
562
|
-
color: #
|
579
|
+
color: #333332;
|
563
580
|
/*
|
564
581
|
font-size: 1em;
|
565
582
|
text-transform: uppercase;
|
@@ -589,7 +606,7 @@ h5 code {
|
|
589
606
|
/*padding: 0.75em 1.5em 0.25em 1.5em;*/
|
590
607
|
padding: 0.25em 0;
|
591
608
|
margin-bottom: 2.5em;
|
592
|
-
border-bottom: 1px solid #
|
609
|
+
border-bottom: 1px solid #333332;
|
593
610
|
/* TODO maybe what we need to get articles to start in left column
|
594
611
|
-webkit-column-break-before: left;
|
595
612
|
page-break-before: left;
|
@@ -602,7 +619,7 @@ h1.chapter-title {
|
|
602
619
|
margin-top: 3.5em; /* 4.2rem - would like to use 9vh */
|
603
620
|
margin-bottom: 0;
|
604
621
|
padding-bottom: 0.8333em; /* 1.2rem */
|
605
|
-
color: #
|
622
|
+
color: #333332;
|
606
623
|
text-transform: uppercase; /* not supported in Adobe Digital Editions */
|
607
624
|
word-spacing: -0.075em;
|
608
625
|
letter-spacing: -0.01em;
|
@@ -610,7 +627,6 @@ h1.chapter-title {
|
|
610
627
|
|
611
628
|
h1.chapter-title .subtitle {
|
612
629
|
font-weight: 400;
|
613
|
-
color: #333332;
|
614
630
|
display: block;
|
615
631
|
font-size: 1.5em;
|
616
632
|
margin: 0 0 0 0.75em; /* would like to use 2vw */
|
@@ -627,7 +643,6 @@ h1.chapter-title b {
|
|
627
643
|
}
|
628
644
|
|
629
645
|
.chapter-header p.byline {
|
630
|
-
color: #333332;
|
631
646
|
/* float left and height 0 takes this line out of the flow */
|
632
647
|
float: left;
|
633
648
|
height: 0;
|
@@ -658,17 +673,11 @@ div.abstract {
|
|
658
673
|
}
|
659
674
|
|
660
675
|
div.abstract > p {
|
661
|
-
color: #
|
676
|
+
color: #333332;
|
662
677
|
font-size: 1.05em; /* or 1.1em? */
|
663
678
|
line-height: 1.75;
|
664
679
|
}
|
665
680
|
|
666
|
-
div.abstract > p a:link {
|
667
|
-
color: #666665;
|
668
|
-
/* hack for font color in iBooks */
|
669
|
-
-webkit-text-fill-color: #666665;
|
670
|
-
}
|
671
|
-
|
672
681
|
div.abstract > p:first-child::first-line {
|
673
682
|
font-weight: bold;
|
674
683
|
-webkit-font-feature-settings: "kern" off;
|
@@ -743,7 +752,7 @@ figcaption,
|
|
743
752
|
caption {
|
744
753
|
font-size: 0.9em;
|
745
754
|
font-style: italic;
|
746
|
-
color: #
|
755
|
+
color: #333332;
|
747
756
|
letter-spacing: -0.01em;
|
748
757
|
line-height: 1.4;
|
749
758
|
text-align: left;
|
@@ -775,10 +784,10 @@ figure.listing > figcaption + pre {
|
|
775
784
|
}
|
776
785
|
|
777
786
|
aside.sidebar {
|
778
|
-
border: 1px solid #
|
787
|
+
border: 1px solid #C8C8C8;
|
779
788
|
padding: 0 1.5em;
|
780
789
|
font-size: 0.9em;
|
781
|
-
background-color: #
|
790
|
+
background-color: #E0E0E0;
|
782
791
|
text-align: right; /* aligns heading to right */
|
783
792
|
/*
|
784
793
|
-webkit-box-shadow: 0px 1px 1px rgba(102, 102, 101, 0.15);
|
@@ -806,7 +815,7 @@ aside.sidebar > h2 {
|
|
806
815
|
letter-spacing: 0;
|
807
816
|
display: inline-block;
|
808
817
|
white-space: nowrap; /* for some reason it's wrapping prematurely */
|
809
|
-
border: 1px solid #
|
818
|
+
border: 1px solid #C8C8C8;
|
810
819
|
padding: 1.5em .75em .5em .75em;
|
811
820
|
margin: -1em 0.5em -0.25em 0.5em;
|
812
821
|
background-color: #FFFFFF;
|
@@ -843,7 +852,7 @@ div[class~="blockquote"] {
|
|
843
852
|
}
|
844
853
|
|
845
854
|
blockquote > p {
|
846
|
-
color: #
|
855
|
+
color: #101010;
|
847
856
|
font-style: italic;
|
848
857
|
|
849
858
|
/*
|
@@ -860,7 +869,7 @@ blockquote > p {
|
|
860
869
|
|
861
870
|
blockquote > p:first-of-type::before {
|
862
871
|
display: inline-block;
|
863
|
-
color: #
|
872
|
+
color: #333332;
|
864
873
|
text-shadow: 0 1px 2px rgba(102, 102, 101, 0.3);
|
865
874
|
|
866
875
|
/* using serif quote from entypo */
|
@@ -893,7 +902,7 @@ blockquote footer {
|
|
893
902
|
blockquote footer .context {
|
894
903
|
font-size: 0.9em;
|
895
904
|
letter-spacing: -0.05em;
|
896
|
-
color: #
|
905
|
+
color: #333332;
|
897
906
|
}
|
898
907
|
|
899
908
|
pre {
|
@@ -904,14 +913,10 @@ pre {
|
|
904
913
|
overflow-wrap: break-word; /* break in middle of long word if no other break opportunities are available */
|
905
914
|
font-size: 0.85em;
|
906
915
|
line-height: 1.4; /* matches what Kindle uses and can't go less */
|
907
|
-
background-color: #
|
916
|
+
background-color: #E0E0E0;
|
908
917
|
padding: 0.6em 0.9em; /* this is supposed to be '0.5rem 0.75rem' but Sony Readers crash when see that (at least, PRS-350, PRS-505, PRS-T1) */
|
909
|
-
|
910
|
-
border-
|
911
|
-
*/
|
912
|
-
/* QUESTION #B3B3B1? */
|
913
|
-
border-top: 1px solid #DCDCDE;
|
914
|
-
border-right: 1px solid #DCDCDE;
|
918
|
+
border-top: 1px solid #C8C8C8;
|
919
|
+
border-right: 1px solid #C8C8C8;
|
915
920
|
}
|
916
921
|
|
917
922
|
body:first-of-type pre {
|
@@ -1104,8 +1109,6 @@ table.table th,
|
|
1104
1109
|
table.table td {
|
1105
1110
|
line-height: 1.4;
|
1106
1111
|
padding: 0.5em 0.5em 1em 0.1em;
|
1107
|
-
vertical-align: top;
|
1108
|
-
text-align: left;
|
1109
1112
|
-webkit-column-break-inside: avoid;
|
1110
1113
|
page-break-inside: avoid;
|
1111
1114
|
}
|
@@ -1115,7 +1118,7 @@ table.table th {
|
|
1115
1118
|
}
|
1116
1119
|
|
1117
1120
|
table.table thead th {
|
1118
|
-
border-bottom: 1px solid #
|
1121
|
+
border-bottom: 1px solid #707070;
|
1119
1122
|
}
|
1120
1123
|
|
1121
1124
|
table.table td > p,
|
@@ -1123,47 +1126,43 @@ table.table div.embed > * {
|
|
1123
1126
|
margin-top: 0;
|
1124
1127
|
}
|
1125
1128
|
|
1126
|
-
table.table td > p {
|
1127
|
-
text-align: left;
|
1128
|
-
}
|
1129
|
-
|
1130
1129
|
/* REVIEW */
|
1131
1130
|
table.table td > p + p,
|
1132
1131
|
table.table div.embed > * + * {
|
1133
1132
|
margin-top: 1em;
|
1134
1133
|
}
|
1135
1134
|
|
1136
|
-
table.table-framed {
|
1135
|
+
table.table-framed-all {
|
1137
1136
|
border-width: 1px;
|
1138
1137
|
border-style: solid;
|
1139
|
-
border-color: #
|
1138
|
+
border-color: #707070;
|
1140
1139
|
}
|
1141
1140
|
|
1142
1141
|
table.table-framed-topbot {
|
1143
1142
|
border-width: 1px 0;
|
1144
1143
|
border-style: solid;
|
1145
|
-
border-color: #
|
1144
|
+
border-color: #707070;
|
1146
1145
|
}
|
1147
1146
|
|
1148
1147
|
table.table-framed-sides {
|
1149
1148
|
border-width: 0 1px;
|
1150
1149
|
border-style: solid;
|
1151
|
-
border-color: #
|
1150
|
+
border-color: #707070;
|
1152
1151
|
}
|
1153
1152
|
|
1154
|
-
table.table-grid th,
|
1155
|
-
table.table-grid td {
|
1156
|
-
border-width:
|
1153
|
+
table.table-grid-all th,
|
1154
|
+
table.table-grid-all td {
|
1155
|
+
border-width: 1px 1px 1px 1px;
|
1157
1156
|
border-style: solid;
|
1158
|
-
border-color: #
|
1157
|
+
border-color: #707070;
|
1159
1158
|
}
|
1160
1159
|
|
1161
|
-
table.table-grid thead tr > *:last-child {
|
1160
|
+
table.table-grid-all thead tr > *:last-child {
|
1162
1161
|
border-right-width: 0;
|
1163
1162
|
}
|
1164
1163
|
|
1165
|
-
table.table-grid tbody tr:last-child > th,
|
1166
|
-
table.table-grid tbody tr:last-child > td {
|
1164
|
+
table.table-grid-all tbody tr:last-child > th,
|
1165
|
+
table.table-grid-all tbody tr:last-child > td {
|
1167
1166
|
border-bottom-width: 0;
|
1168
1167
|
}
|
1169
1168
|
|
@@ -1171,14 +1170,14 @@ table.table-grid-rows tbody th,
|
|
1171
1170
|
table.table-grid-rows tbody td {
|
1172
1171
|
border-width: 1px 0 0 0;
|
1173
1172
|
border-style: solid;
|
1174
|
-
border-color: #
|
1173
|
+
border-color: #707070;
|
1175
1174
|
}
|
1176
1175
|
|
1177
1176
|
table.table-grid-cols th,
|
1178
1177
|
table.table-grid-cols td {
|
1179
1178
|
border-width: 0 1px 0 0;
|
1180
1179
|
border-style: solid;
|
1181
|
-
border-color: #
|
1180
|
+
border-color: #707070;
|
1182
1181
|
}
|
1183
1182
|
|
1184
1183
|
table.table-grid-cols thead th:last-child {
|
@@ -1209,7 +1208,7 @@ hr.pagebreak + * {
|
|
1209
1208
|
|
1210
1209
|
img.headshot {
|
1211
1210
|
float: left;
|
1212
|
-
border: 1px solid #
|
1211
|
+
border: 1px solid #707070;
|
1213
1212
|
padding: 1px;
|
1214
1213
|
margin: 0.35em 1em 0.15em 0;
|
1215
1214
|
height: 5em !important;
|
@@ -1247,6 +1246,11 @@ nav#toc ol {
|
|
1247
1246
|
list-style-type: none;
|
1248
1247
|
}
|
1249
1248
|
|
1249
|
+
/* Calibre doesn't hide <nav hidden="hidden"> for some reason */
|
1250
|
+
nav[hidden~="hidden"] {
|
1251
|
+
display: none;
|
1252
|
+
}
|
1253
|
+
|
1250
1254
|
.icon {
|
1251
1255
|
display: none;
|
1252
1256
|
}
|