UNPKG

2.98 kBCSSView Raw
1/* Readium CSS
2 Default module
3
4 A stylesheet for unstyled ebooks based on HTML5 Suggested Rendering
5 Note: works in combination with Base module
6
7 Repo: https://github.com/readium/readium-css */
8
9/* CONFIG */
10
11:root {
12 --RS__compFontFamily: var(--RS__baseFontFamily);
13 --RS__codeFontFamily: var(--RS__monospaceTf);
14
15 --RS__typeScale: 1.125; /* 1.067 | 1.125 | 1.2 | 1.25 | 1.333 | 1.414 | 1.5 | 1.618 */
16 --RS__baseFontSize: 100%;
17
18 --RS__flowSpacing: 1.5rem;
19 --RS__paraSpacing: 0;
20 --RS__paraIndent: 1em;
21
22 --RS__linkColor: #0000EE;
23 --RS__visitedColor: #551A8B;
24
25 --RS__primaryColor: ;
26 --RS__secondaryColor: ;
27}
28
29/* STYLES */
30
31/* Typo */
32
33body {
34 font-size: var(--RS__baseFontSize);
35}
36
37h1, h2, h3, h4, h5, h6 {
38 font-family: var(--RS__compFontFamily);
39}
40
41/* Flow content */
42
43blockquote, figure, p, pre,
44aside, footer, form, hr {
45 margin-top: var(--RS__flowSpacing);
46 margin-bottom: var(--RS__flowSpacing);
47}
48
49p {
50 margin-top: var(--RS__paraSpacing);
51 margin-bottom: var(--RS__paraSpacing);
52 text-indent: var(--RS__paraIndent);
53}
54
55h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p,
56hr + p {
57 text-indent: 0;
58}
59
60pre {
61 font-family: var(--RS__codeFontFamily);
62}
63
64/* Phrasing content */
65
66code, kbd, samp, tt {
67 font-family: var(--RS__codeFontFamily);
68}
69
70sub, sup {
71 position: relative;
72 font-size: 67.5%;
73 line-height: 1;
74}
75
76sub {
77 bottom: -0.2ex;
78}
79
80sup {
81 bottom: 0;
82}
83
84:link {
85 color: var(--RS__linkColor);
86}
87
88:visited {
89 color: var(--RS__visitedColor);
90}
91
92/* Headings */
93
94h1 {
95 margin-top: calc(var(--RS__flowSpacing) * 2);
96 margin-bottom: calc(var(--RS__flowSpacing) * 2);
97 /* The following is base font size * typescale power of 3 */
98 font-size: calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale));
99}
100
101h2 {
102 margin-top: calc(var(--RS__flowSpacing) * 2);
103 margin-bottom: var(--RS__flowSpacing);
104 /* The following is base font size * typescale power of 2 */
105 font-size: calc((1em * var(--RS__typeScale)) * var(--RS__typeScale));
106}
107
108h3 {
109 margin-top: var(--RS__flowSpacing);
110 margin-bottom: var(--RS__flowSpacing);
111 font-size: calc(1em * var(--RS__typeScale));
112}
113
114h4 {
115 margin-top: var(--RS__flowSpacing);
116 margin-bottom: var(--RS__flowSpacing);
117 font-size: 1em;
118}
119
120h5 {
121 margin-top: var(--RS__flowSpacing);
122 margin-bottom: var(--RS__flowSpacing);
123 font-size: 1em;
124 font-variant: small-caps;
125}
126
127h6 {
128 margin-top: var(--RS__flowSpacing);
129 margin-bottom: 0;
130 font-size: 1em;
131 text-transform: lowercase;
132 font-variant: small-caps;
133}
134
135/* Lists */
136
137dl, ol, ul {
138 margin-top: var(--RS__flowSpacing);
139 margin-bottom: var(--RS__flowSpacing);
140}
141
142/* Table */
143
144table {
145 margin: var(--RS__flowSpacing) 0;
146 border: 1px solid currentColor;
147 border-collapse: collapse;
148 empty-cells: show;
149}
150
151thead, tbody, tfoot, table > tr {
152 vertical-align: top;
153}
154
155th {
156 text-align: left;
157}
158
159th, td {
160 padding: 4px;
161 border: 1px solid currentColor;
162}
163/*# sourceMappingURL=ReadiumCSS-default.css.map */
\No newline at end of file