UNPKG

3.55 kBCSSView Raw
1/* Readium CSS
2 Default module for CJK vertical writing
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 /* Extra variables for Japanese font-stacks:
13 • --RS__serif-ja-v;
14 • --RS__sans-serif-ja-v.
15
16 They can be used instead of --RS__baseFontFamily and --RS__compFontFamily */
17
18 --RS__compFontFamily: var(--RS__baseFontFamily);
19 --RS__codeFontFamily: var(--RS__monospaceTf);
20
21 --RS__typeScale: 1.125; /* 1.067 | 1.125 | 1.2 | 1.25 | 1.333 | 1.414 | 1.5 | 1.618 */
22 --RS__baseFontSize: 87.5%;
23
24 --RS__flowSpacing: 1.5rem;
25 --RS__paraSpacing: 0;
26 --RS__paraIndent: 1em;
27
28 --RS__linkColor: #0000EE;
29 --RS__visitedColor: #551A8B;
30
31 --RS__primaryColor: ;
32 --RS__secondaryColor: ;
33}
34
35:lang("mn-Mong") {
36 --RS__baseFontSize: 100%;
37}
38
39/* STYLES */
40
41/* Typo */
42
43body {
44 font-size: var(--RS__baseFontSize);
45 text-align: justify;
46 text-justify: inter-character;
47}
48
49h1, h2, h3, h4, h5, h6 {
50 font-family: var(--RS__baseFontFamily);
51 text-align: left;
52 text-align: start;
53}
54
55/* Flow content */
56
57blockquote, figure, p, pre,
58aside, footer, form, hr {
59 margin-right: var(--RS__flowSpacing);
60 margin-left: var(--RS__flowSpacing);
61}
62
63p {
64 margin-right: var(--RS__paraSpacing);
65 margin-left: var(--RS__paraSpacing);
66 text-indent: var(--RS__paraIndent);
67}
68
69pre {
70 font-family: var(--RS__codeFontFamily);
71}
72
73/* Phrasing content */
74
75code, kbd, samp, tt {
76 font-family: var(--RS__codeFontFamily);
77}
78
79sub, sup {
80 position: relative;
81 font-size: 67.5%;
82 line-height: 1;
83}
84
85sub {
86 left: -0.2ex;
87}
88
89sup {
90 right: 0;
91}
92
93em {
94 -webkit-text-emphasis: sesame;
95 -epub-text-emphasis: sesame;
96 text-emphasis: sesame;
97}
98
99:link {
100 color: var(--RS__linkColor);
101}
102
103:visited {
104 color: var(--RS__visitedColor);
105}
106
107/* Headings */
108
109h1 {
110 margin-right: calc(var(--RS__flowSpacing) * 2);
111 margin-left: calc(var(--RS__flowSpacing) * 2);
112 /* The following is base font size * typescale power of 3 */
113 font-size: calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale));
114 text-indent: 2rem;
115}
116
117h2 {
118 margin-right: calc(var(--RS__flowSpacing) * 2);
119 margin-left: var(--RS__flowSpacing);
120 /* The following is base font size * typescale power of 2 */
121 font-size: calc((1em * var(--RS__typeScale)) * var(--RS__typeScale));
122 text-indent: 3rem;
123}
124
125h3 {
126 margin-right: var(--RS__flowSpacing);
127 margin-left: var(--RS__flowSpacing);
128 font-size: calc(1em * var(--RS__typeScale));
129 text-indent: 4rem;
130}
131
132h4 {
133 margin-right: var(--RS__flowSpacing);
134 margin-left: var(--RS__flowSpacing);
135 font-family: var(--RS__compFontFamily);
136 font-size: 1em;
137 text-indent: 4rem;
138}
139
140h5 {
141 margin-right: var(--RS__flowSpacing);
142 margin-left: var(--RS__flowSpacing);
143 font-family: var(--RS__compFontFamily);
144 font-size: smaller;
145 text-indent: 4rem;
146}
147
148h6 {
149 margin-right: var(--RS__flowSpacing);
150 margin-left: 0;
151 font-family: var(--RS__compFontFamily);
152 font-size: smaller;
153 font-weight: normal;
154 text-indent: 4rem;
155}
156
157/* Lists */
158
159dl, ol, ul {
160 margin-right: var(--RS__flowSpacing);
161 margin-left: var(--RS__flowSpacing);
162}
163
164/* Table */
165
166table {
167 margin: 0 var(--RS__flowSpacing);
168 border: 1px solid currentColor;
169 border-collapse: collapse;
170 empty-cells: show;
171}
172
173thead, tbody, tfoot, table > tr {
174 vertical-align: top;
175}
176
177th {
178 text-align: left;
179}
180
181th, td {
182 padding: 4px;
183 border: 1px solid currentColor;
184}
185/*# sourceMappingURL=ReadiumCSS-default.css.map */
\No newline at end of file