UNPKG

2.98 kBCSSView Raw
1/* Readium CSS
2 Default module for RTL scripts
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 text-align: justify;
36}
37
38h1, h2, h3, h4, h5, h6 {
39 font-family: var(--RS__compFontFamily);
40 text-align: right;
41}
42
43/* Flow content */
44
45blockquote, figure, p, pre,
46aside, footer, form, hr {
47 margin-top: var(--RS__flowSpacing);
48 margin-bottom: var(--RS__flowSpacing);
49}
50
51p {
52 margin-top: var(--RS__paraSpacing);
53 margin-bottom: var(--RS__paraSpacing);
54 text-indent: var(--RS__paraIndent);
55}
56
57h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p,
58hr + p {
59 text-indent: 0;
60}
61
62pre {
63 font-family: var(--RS__codeFontFamily);
64}
65
66/* Phrasing content */
67
68code, kbd, samp, tt {
69 font-family: var(--RS__codeFontFamily);
70}
71
72sub, sup {
73 position: relative;
74 font-size: 67.5%;
75 line-height: 1;
76}
77
78sub {
79 bottom: -0.2ex;
80}
81
82sup {
83 bottom: 0;
84}
85
86:link {
87 color: var(--RS__linkColor);
88}
89
90:visited {
91 color: var(--RS__visitedColor);
92}
93
94/* Headings */
95
96h1 {
97 margin-top: calc(var(--RS__flowSpacing) * 2);
98 margin-bottom: calc(var(--RS__flowSpacing) * 2);
99 /* The following is base font size * typescale power of 3 */
100 font-size: calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale));
101}
102
103h2 {
104 margin-top: calc(var(--RS__flowSpacing) * 2);
105 margin-bottom: var(--RS__flowSpacing);
106 /* The following is base font size * typescale power of 2 */
107 font-size: calc((1em * var(--RS__typeScale)) * var(--RS__typeScale));
108}
109
110h3 {
111 margin-top: var(--RS__flowSpacing);
112 margin-bottom: var(--RS__flowSpacing);
113 font-size: calc(1em * var(--RS__typeScale));
114}
115
116h4 {
117 margin-top: var(--RS__flowSpacing);
118 margin-bottom: var(--RS__flowSpacing);
119 font-size: 1em;
120}
121
122h5 {
123 margin-top: var(--RS__flowSpacing);
124 margin-bottom: var(--RS__flowSpacing);
125 font-size: smaller;
126}
127
128h6 {
129 margin-top: var(--RS__flowSpacing);
130 margin-bottom: 0;
131 font-size: smaller;
132 font-weight: normal;
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: initial;
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