-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
epub.css
64 lines (55 loc) · 1.78 KB
/
epub.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* This defines styles and classes used in the book */
body { margin: 0; text-align: justify; font-size: medium; font-family: Arial, Helvetica, sans-serif; }
code { font-family: monospace; font-weight: bold; font-size: small, overflow-x: scroll }
h1 { text-align: left; }
h2 { text-align: left; }
h3 { text-align: left; }
h4 { text-align: left; }
h5 { text-align: left; }
h6 { text-align: left; }
h1.title { }
h2.author { }
h3.date { }
ol.toc { padding: 0; margin-left: 1em; }
ol.toc li { list-style-type: none; margin: 0; padding: 0; }
/* Disable hyphenation for headings to avoid single-syllable-lines.
*/
h1,
h2 {
-epub-hyphens: none;
-webkit-hyphens: none;
-moz-hyphens: none;
hyphens: none;
}
/* Set the minimum amount of lines to show up on a separate page. (There is not much support for this at the moment.)
*/
p,
blockquote {
orphans: 2;
widows: 2;
}
/* Turn on hyphenation for paragraphs and captions only.
*/
p,
figcaption {
-epub-hyphens: auto;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
/* Shortcodes for page-break rules.
Use data attributes to designate if and how the page should be broken before, inside or after an element.
*/
h1, h2, h3, h4, h5, h6,
table, img, figure, video,
[data-page-break~=inside][data-page-break~=avoid] { page-break-inside: avoid; }
[data-page-break~=after] { page-break-after: always; }
h1, h2, h3, h4, h5, h6,
[data-page-break~=after][data-page-break~=avoid] { page-break-after: avoid; }
[data-page-break~=before] { page-break-before: always; }
[data-page-break~=before][data-page-break~=avoid] { page-break-before: avoid; }
img[data-page-break~=before] { page-break-before: left; }
/* Some Amazon Stuff
*/
@media amzn-kf8 {
}