UNPKG

24.1 kBCSSView Raw
1/* Readium CSS
2 Config module
3
4 A file allowing implementers to customize flags for reading modes,
5 user settings, etc.
6
7 Repo: https://github.com/readium/readium-css */
8
9/* Custom medias
10 Syntax: @custom-media --variable (prop: value) */
11
12/* Responsive columns
13 The minimum width for which responsive columns (2 -> 1 and vice versa,
14 depending on the current font-size) must be enabled */
15
16/* Mobile columns
17 The minimum and maximum width for mobile devices.
18 We’re forcing the landscape orientation by default,
19 and must still investigate large tablets (iPad Pro, Surface Pro 3, etc.). */
20
21/* Custom selectors
22 Syntax: @custom-selector :--variable selector
23 The selectors you will use for flags/switches
24 You can alternatively use classes or custom data-* attributes */
25
26/* User view = paged | scrolled */
27
28/* Font-family override */
29
30/* Advanced settings */
31
32/* Reading Modes */
33
34/* Filters (images) */
35
36/* Accessibility normalization */
37
38/* Accessibility font. You can add selectors, using “, ” as a separator, if you have multiple fonts */
39
40/* Direction i.e. ltr and rtl */
41
42/* Readium CSS
43 Pagination module
44
45 A set of styles to paginate ePublications
46
47 Repo: https://github.com/readium/readium-css */
48
49/* Config */
50
51/* Columns are responsive by default, even if column-width is set in pixels,
52 which means two-page spread will switch to single page depending on current font-size.
53 If you want more control, I’m afraid you’ll have to update colWidth/colGap dynamically,
54 which is how a significant amount of RS do at the moment. */
55
56/* Default for smartphone portrait (small screens) */
57
58:root {
59 /* Your columns’ width floor */
60 --RS__colWidth: 45em; /* The width at which we’ll switch to 2 columns by default. PS: you can’t set it in rem */
61
62 /* Ideal number of columns (depending on columns’ width floor) */
63 --RS__colCount: 1;
64
65 /* Gap between columns (in pixels so that it won’t resize with font-size) */
66 --RS__colGap: 0;
67
68 /* Optimal line-length (rem will take :root font-size into account, whatever the body’s font-size) */
69 --RS__maxLineLength: 40rem;
70
71 /* Default page horizontal margins (in pixels so that it won’t resize with font-size) */
72 --RS__pageGutter: 20px; /* See if colGap and pageGutter can be the same var */
73}
74
75/* Reset page margins for Forward compatibility */
76
77@page {
78 margin: 0 !important;
79}
80
81/* :root selector has same specificity as a class i.e. 0010
82 We might have to change that to html / context
83 -> https://css-tricks.com/almanac/selectors/r/root/ */
84
85:root {
86
87 /* In case you use left position to scroll, can be removed if using transform: translateX() */
88 position: relative;
89
90 -webkit-column-width: var(--RS__colWidth);
91 -moz-column-width: var(--RS__colWidth);
92 column-width: var(--RS__colWidth);
93
94 /* Init pagination */
95 /* TODO: document columns’ logic cos it might feel weird at first */
96 -webkit-column-count: var(--RS__colCount);
97 -moz-column-count: var(--RS__colCount);
98 column-count: var(--RS__colCount);
99
100 -webkit-column-gap: var(--RS__colGap);
101 -moz-column-gap: var(--RS__colGap);
102 column-gap: var(--RS__colGap);
103
104 /* Default is balance and we want columns to be filled entirely (100vh) */
105 -moz-column-fill: auto;
106 column-fill: auto;
107 width: 100%;
108 height: 100vh;
109 max-width: 100%;
110 max-height: 100vh;
111 min-width: 100%;
112 min-height: 100vh;
113 padding: 0 !important;
114 margin: 0 !important;
115
116 /* Column size will depend on this if we want to make it responsive */
117 font-size: 100% !important;
118
119 -webkit-text-size-adjust: 100%;
120
121 /* Switch to newer box model (not inherited by authors’ styles) */
122 box-sizing: border-box;
123
124 /* Fix bug for older Chrome */
125 -webkit-perspective: 1;
126 /* Prevents options pop-up when long tap in webkit */
127 -webkit-touch-callout: none;
128}
129
130body {
131 /* overflow: hidden; bugfix: contents won’t paginate in Firefox and one sample in Safari */
132 width: 100%;
133
134 /* Limit line-length but we have to reset when 2 columns and control the viewport.
135 By using max-width + margin auto, margins will shrink when font-size increases,
136 which is what would be expected in terms of typography. */
137 max-width: var(--RS__maxLineLength) !important;
138 padding: 0 var(--RS__pageGutter) !important;
139 margin: 0 auto !important;
140
141 /* We need a minimum padding on body so that descandants/ascendants in italic/script are not cut-off.
142 Drawback: we have to use border-box so that it doesn’t screw the box model,
143 which means it impacts colWidth and max-width */
144 box-sizing: border-box;
145}
146
147/* We’ll now redefine margins and columns depending on the minimum width available
148 The goal is having the simplest model possible and avoid targeting devices */
149
150/* Smartphone landscape */
151
152@media screen and (min-width: 35em) {
153 :root {
154 --RS__pageGutter: 30px;
155 }
156}
157
158/* Tablet portrait */
159
160@media screen and (min-width: 45em) {
161 :root {
162 --RS__pageGutter: 40px;
163 }
164}
165
166/* Desktop + tablet large */
167
168/* We get the previous settings, we just change the margins */
169
170@media screen and (min-width: 75em) {
171 :root {
172 --RS__pageGutter: 50px;
173 }
174}
175
176/* At this point (80em or so), constraining line length must be done at the web view/iframe level, or by limiting the size of :root itself */
177
178/* Responsive columns */
179
180@media screen and (min-width: 60em), screen and (min-device-width: 36em) and (max-device-width: 47em) and (orientation: landscape) {
181 :root {
182 /* The size at which we want 2 columns to switch to 1 (depending on font-size) */
183 --RS__colWidth: 20em; /* 20 * 16 = 320px but 20 * 28 = 560px so it will switch to 1 col @ 175% font-size (user-setting) on an iPad */
184 /* We constrain to 2 columns so that we can never get 3 or 4, etc. */
185 --RS__colCount: 2;
186 --RS__maxLineLength: 39.99rem; /* If we don’t use this, colNumber user setting won’t work in Safari… */
187 }
188}
189
190/* Readium CSS
191 Scroll module
192
193 A set of styles to scroll ePublications
194 This module overrides pagination
195
196 Repo: https://github.com/readium/readium-css */
197
198:root[style*="readium-scroll-on"] {
199
200 /* Reset columns, auto + auto = columns can’t be created */
201 -webkit-columns: auto auto !important;
202 -moz-columns: auto auto !important;
203 columns: auto auto !important;
204 width: auto !important;
205 height: auto !important;
206 max-width: none !important;
207 max-height: none !important;
208 /* Reset html size so that the user can scroll */
209 min-width: 0 !important;
210 min-height: 0 !important;
211}
212
213/* Make sure line-length is limited in all configs */
214
215:root[style*="readium-scroll-on"] body {
216 --RS__maxLineLength: 40rem !important;
217}
218
219/* Readium CSS
220 Default highlights
221
222 A stylesheet for user highlights
223
224 Repo: https://github.com/readium/readium-css */
225
226/* User Highlights */
227
228.readiumCSS-yellow-highlight {
229 background-color: rgba(255, 255, 0, 0.5);
230}
231
232.readiumCSS-green-highlight {
233 background-color: rgba(0, 255, 0, 0.5);
234}
235
236.readiumCSS-orange-highlight {
237 background-color: rgba(255, 165, 0, 0.5);
238}
239
240.readiumCSS-pink-highlight {
241 background-color: rgba(255, 105, 180, 0.5);
242}
243
244/* Media overlays */
245
246.readiumCSS-mo-active-default {
247 color: black !important;
248 background-color: yellow !important;
249}
250
251/* Readium CSS
252 Night mode
253
254 A preset theme for night mode
255
256 Repo: https://github.com/readium/readium-css */
257
258/* CONFIG */
259
260/* [style*="--USER__appearance"] can be used to increase specificity but performance hit */
261
262:root[style*="readium-night-on"] {
263 --RS__backgroundColor: #000000;
264 --RS__textColor: #FEFEFE;
265
266 --RS__linkColor: #63caff;
267 --RS__visitedColor: #0099E5;
268
269 /* This can be customized but initial will re-use default value of the browser */
270 --RS__selectionBackgroundColor: #b4d8fe;
271 --RS__selectionTextColor: inherit;
272}
273
274/* we don’t need to redeclare bg-color and color for :root since we will inherit and update from day/default mode */
275
276:root[style*="readium-night-on"] *:not(a) {
277 color: inherit !important;
278 background-color: transparent !important;
279 border-color: currentColor !important;
280}
281
282:root[style*="readium-night-on"] svg text {
283 fill: currentColor !important;
284 stroke: none !important;
285}
286
287:root[style*="readium-night-on"] a:link,
288:root[style*="readium-night-on"] a:link * {
289 color: var(--RS__linkColor) !important;
290}
291
292:root[style*="readium-night-on"] a:visited,
293:root[style*="readium-night-on"] a:visited * {
294 color: var(--RS__visitedColor) !important;
295}
296
297:root[style*="readium-night-on"] img[class*="gaiji"],
298:root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child {
299 -webkit-filter: invert(100%);
300 filter: invert(100%);
301}
302
303/* Darken all images on user’s demand */
304
305:root[style*="readium-night-on"][style*="readium-darken-on"] img {
306 -webkit-filter: brightness(80%);
307 filter: brightness(80%);
308}
309
310/* Invert all images on user’s demand */
311
312:root[style*="readium-night-on"][style*="readium-invert-on"] img {
313 -webkit-filter: invert(100%);
314 filter: invert(100%);
315}
316
317/* Darken and invert on user’s demand */
318
319:root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img {
320 -webkit-filter: brightness(80%) invert(100%);
321 filter: brightness(80%) invert(100%);
322}
323
324/* Readium CSS
325 Sepia mode
326
327 A preset theme for sepia mode
328
329 Repo: https://github.com/readium/readium-css */
330
331/* CONFIG */
332
333:root[style*="readium-sepia-on"] {
334 --RS__backgroundColor: #faf4e8;
335 --RS__textColor: #121212;
336
337 --RS__linkColor: #0000EE;
338 --RS__visitedColor: #551A8B;
339
340 /* This can be customized but initial will re-use default value of the browser */
341 --RS__selectionBackgroundColor: #b4d8fe;
342 --RS__selectionTextColor: inherit;
343
344 --RS__maxLineLength: 40.01rem; /* Forcing a reflow in Blink/Webkit so that blend mode can work */
345}
346
347/* we don’t need to redeclare bg-color and color for :root since we will inherit and update from day/default mode */
348
349:root[style*="readium-sepia-on"] body {
350 /* Should be transparent but Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=711955&q=mix-blend-mode&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified */
351
352 color: inherit;
353 background-color: var(--RS__backgroundColor);
354}
355
356:root[style*="readium-sepia-on"] a:link,
357:root[style*="readium-sepia-on"] a:link * {
358 color: var(--RS__linkColor);
359}
360
361:root[style*="readium-sepia-on"] a:visited,
362:root[style*="readium-sepia-on"] a:visited * {
363 color: var(--RS__visitedColor);
364}
365
366:root[style*="readium-sepia-on"] svg,
367:root[style*="readium-sepia-on"] img {
368 /* Make sure the proper bg-color is used for the blend mode */
369 background-color: transparent !important;
370 mix-blend-mode: multiply;
371}
372
373/* Readium CSS
374 OS Accessibility Modes
375
376 A stylesheet to deal with OS accessibility settings
377
378 Repo: https://github.com/readium/readium-css */
379
380/* Windows high contrast colors are mapped to CSS system color keywords
381 See http://www.gwhitworth.com/blog/2017/04/how-to-use-ms-high-contrast */
382
383@media screen and (-ms-high-contrast: active) {
384 :root {
385 color: windowText !important;
386 background-color: window !important;
387 }
388
389 /* The following selectors are super funky but it makes sure everything is inherited, this is indeed critical for this mode */
390 :root :not(#\#):not(#\#):not(#\#),
391 :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#)
392 :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) {
393 color: inherit !important;
394 background-color: inherit !important;
395 }
396
397 .readiumCSS-mo-active-default {
398 color: highlightText !important;
399 background-color: highlight !important;
400 }
401
402 /* For links, hyperlink keyword is automatically set */
403
404 /* Should we also set user highlights? */
405}
406
407@media screen and (-ms-high-contrast: white-on-black) {
408 :root[style*="readium-night-on"] img[class*="gaiji"],
409 :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child {
410 -webkit-filter: none !important;
411 filter: none !important;
412 }
413 :root[style*="readium-night-on"][style*="readium-invert-on"] img {
414 -webkit-filter: none !important;
415 filter: none !important;
416 }
417 :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img {
418 -webkit-filter: brightness(80%);
419 filter: brightness(80%);
420 }
421}
422
423/* Will be true on recent versions of iOS and MacOS if inverted setting enabled by the user */
424
425@media screen and (inverted-colors) {
426 :root[style*="readium-night-on"] img[class*="gaiji"],
427 :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child {
428 -webkit-filter: none !important;
429 filter: none !important;
430 }
431 :root[style*="readium-night-on"][style*="readium-invert-on"] img {
432 -webkit-filter: none !important;
433 filter: none !important;
434 }
435 :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img {
436 -webkit-filter: brightness(80%);
437 filter: brightness(80%);
438 }
439}
440
441@media screen and (monochrome) {
442 /* Grayscale (Implemented in Safari, what about eInk?) */
443 /* Must deal with anything color (contrast) so must be managed at the night/sepia/theme level :( */
444}
445
446@media screen and (prefers-reduced-motion) {
447 /* If reduced motion is set on MacOS, in case we have animation/transition */
448}
449
450/* Readium CSS
451 Columns number pref
452
453 A submodule managing columns number for user settings
454 Part of “Chrome Advanced” class – no flag required.
455
456 Repo: https://github.com/readium/readium-css */
457
458/* Number of columns = 1 | 2 */
459
460/* We still need to see if we allow users to force number of columns for all configs, currently it behaves as an "auto" setting */
461
462/* apply col setting except for mobile portrait */
463
464@media screen and (min-width: 60em), screen and (min-device-width: 36em) and (max-device-width: 47em) and (orientation: landscape) {
465 :root[style*="--USER__colCount: 1"],
466 :root[style*="--USER__colCount:1"],
467 :root[style*="--USER__colCount: 2"],
468 :root[style*="--USER__colCount:2"] {
469 -webkit-column-count: var(--USER__colCount);
470 -moz-column-count: var(--USER__colCount);
471 column-count: var(--USER__colCount);
472 }
473
474 /* If one column, make sure we limit line-length */
475 :root[style*="--USER__colCount: 1"],
476 :root[style*="--USER__colCount:1"] {
477 --RS__maxLineLength: 40rem !important; /* This is the only way for the user setting to work in webkit… */
478 --RS__colWidth: 100vw;
479 }
480
481 /* If smartphone landscape, and 2 columns, col width the same as iPad landscape + desktop */
482 :root[style*="--USER__colCount: 2"],
483 :root[style*="--USER__colCount:2"] {
484 --RS__colWidth: auto; /* User explicitely tells he/she wants 2 columns, we reset floor value */
485 }
486}
487
488/* Readium CSS
489 Page margins pref
490
491 A submodule managing page margins for user settings
492 Part of “Chrome Advanced” class – no flag required.
493
494 Repo: https://github.com/readium/readium-css */
495
496/* Page Margins: the user margin is a factor of the page gutter e.g. 0.5, 0.75, 1, 1.25, 1.5, etc. */
497
498:root[style*="--USER__pageMargins"] body {
499 padding: 0 calc(var(--RS__pageGutter) * var(--USER__pageMargins)) !important;
500}
501
502/* Readium CSS
503 Custom colors pref
504
505 A submodule managing custom colors for user settings
506 Part of “Chrome Advanced” class – no flag required.
507
508 Repo: https://github.com/readium/readium-css */
509
510:root[style*="--USER__backgroundColor"] {
511 background-color: var(--USER__backgroundColor) !important;
512}
513
514:root[style*="--USER__backgroundColor"] * {
515 background-color: transparent !important;
516}
517
518:root[style*="--USER__textColor"] {
519 color: var(--USER__textColor) !important;
520}
521
522:root[style*="--USER__textColor"] *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(pre) {
523 color: inherit !important;
524}
525
526/* Readium CSS
527 Text align pref
528
529 A submodule managing text-align for user settings
530 Part of “User Overrides Advanced” class – “advanced settings” flag required.
531
532 Repo: https://github.com/readium/readium-css */
533
534:root[style*="readium-advanced-on"][style*="--USER__textAlign"] {
535 text-align: var(--USER__textAlign);
536}
537
538:root[style*="readium-advanced-on"][style*="--USER__textAlign"] body,
539:root[style*="readium-advanced-on"][style*="--USER__textAlign"] *:not(blockquote):not(figcaption) p,
540:root[style*="readium-advanced-on"][style*="--USER__textAlign"] li {
541 text-align: inherit !important;
542 -moz-text-align-last: auto !important;
543 -epub-text-align-last: auto !important;
544 text-align-last: auto !important;
545}
546
547/* In case something goes wrong at the programmatic level + rtl for body + rtl in ltr */
548
549:root[style*="readium-advanced-on"][dir="rtl"][style*="--USER__textAlign: left"],
550:root[style*="readium-advanced-on"][dir="rtl"][style*="--USER__textAlign:left"],
551:root[style*="readium-advanced-on"][style*="--USER__textAlign: left"] *[dir="rtl"],
552:root[style*="readium-advanced-on"][style*="--USER__textAlign:left"] *[dir="rtl"] {
553 text-align: right;
554}
555
556/* Edge, if logical value is used, think of it as a polyfill. For LTR, it will fall back to the default, which is left */
557
558:root[style*="readium-advanced-on"][dir="rtl"][style*="--USER__textAlign: start"],
559:root[style*="readium-advanced-on"][dir="rtl"][style*="--USER__textAlign:start"] {
560 text-align: right;
561}
562
563/* Readium CSS
564 Font Family pref
565
566 A submodule managing font-family for user settings
567 Part of “User Overrides” class – “font override” flag required.
568
569 Repo: https://github.com/readium/readium-css */
570
571:root[style*="readium-font-on"][style*="--USER__fontFamily"] {
572 font-family: var(--USER__fontFamily) !important;
573}
574
575:root[style*="readium-font-on"][style*="--USER__fontFamily"] body,
576:root[style*="readium-font-on"][style*="--USER__fontFamily"] p,
577:root[style*="readium-font-on"][style*="--USER__fontFamily"] li,
578:root[style*="readium-font-on"][style*="--USER__fontFamily"] div,
579:root[style*="readium-font-on"][style*="--USER__fontFamily"] dt,
580:root[style*="readium-font-on"][style*="--USER__fontFamily"] dd {
581 font-family: inherit !important;
582}
583
584:root[style*="readium-font-on"][style*="--USER__fontFamily"] i:not([lang]),
585:root[style*="readium-font-on"][style*="--USER__fontFamily"] i:not([xml\:lang]),
586:root[style*="readium-font-on"][style*="--USER__fontFamily"] em:not([lang]),
587:root[style*="readium-font-on"][style*="--USER__fontFamily"] em:not([xml\:lang]),
588:root[style*="readium-font-on"][style*="--USER__fontFamily"] cite:not([lang]),
589:root[style*="readium-font-on"][style*="--USER__fontFamily"] cite:not([xml\:lang]),
590:root[style*="readium-font-on"][style*="--USER__fontFamily"] b:not([lang]),
591:root[style*="readium-font-on"][style*="--USER__fontFamily"] b:not([xml\:lang]),
592:root[style*="readium-font-on"][style*="--USER__fontFamily"] strong:not([lang]),
593:root[style*="readium-font-on"][style*="--USER__fontFamily"] strong:not([xml\:lang]),
594:root[style*="readium-font-on"][style*="--USER__fontFamily"] span:not([lang]),
595:root[style*="readium-font-on"][style*="--USER__fontFamily"] span:not([xml\:lang]) {
596 font-family: inherit !important;
597}
598
599/* Readium CSS
600 Font size pref
601
602 A submodule managing font-size for user settings
603 Part of “User Overrides” class – no flag required.
604
605 Repo: https://github.com/readium/readium-css */
606
607:root[style*="--USER__fontSize"] {
608 font-size: var(--USER__fontSize) !important;
609}
610
611/* Readium CSS
612 Line height pref
613
614 A submodule managing line-height for user settings
615 Part of “User Overrides Advanced” class – “advanced settings” flag required.
616
617 Repo: https://github.com/readium/readium-css */
618
619:root[style*="readium-advanced-on"][style*="--USER__lineHeight"] {
620 line-height: var(--USER__lineHeight) !important;
621}
622
623:root[style*="readium-advanced-on"][style*="--USER__lineHeight"] body,
624:root[style*="readium-advanced-on"][style*="--USER__lineHeight"] p,
625:root[style*="readium-advanced-on"][style*="--USER__lineHeight"] li,
626:root[style*="readium-advanced-on"][style*="--USER__lineHeight"] div {
627 line-height: inherit;
628}
629
630/* Readium CSS
631 Para spacing pref
632
633 A submodule managing paragraphs’ top and bottom margins for user settings
634 Part of “User Overrides Advanced” class – “advanced settings” flag required.
635
636 Repo: https://github.com/readium/readium-css */
637
638:root[style*="readium-advanced-on"][style*="--USER__paraSpacing"] p {
639 margin-top: var(--USER__paraSpacing) !important;
640 margin-bottom: var(--USER__paraSpacing) !important;
641}
642
643/* Readium CSS
644 Para indent pref
645
646 A submodule managing paragraphs’ text-indent for user settings
647 Part of “User Overrides Advanced” class – “advanced settings” flag required.
648
649 Repo: https://github.com/readium/readium-css */
650
651:root[style*="readium-advanced-on"][style*="--USER__paraIndent"] p {
652 text-indent: var(--USER__paraIndent) !important;
653}
654
655/* If there are inline-block elements in paragraphs, text-indent will inherit so we must reset it */
656
657:root[style*="readium-advanced-on"][style*="--USER__paraIndent"] p *,
658:root[style*="readium-advanced-on"][style*="--USER__paraIndent"] p:first-letter {
659 text-indent: 0 !important;
660}
661
662/* Readium CSS
663 Ligatures pref
664
665 A submodule managing ligatures for user settings in the Arabic Script (can help with a11y)
666 Part of “User Overrides Advanced” class – “advanced settings” flag required.
667
668 Repo: https://github.com/readium/readium-css */
669
670:root[style*="readium-advanced-on"][style*="--USER__arabicLigatures"] {
671 font-variant-ligatures: var(--USER__ligatures) !important;
672}
673
674:root[style*="readium-advanced-on"][style*="--USER__arabicLigatures"] * {
675 font-variant-ligatures: inherit !important;
676}
677
678/* Readium CSS
679 Font size normalize
680
681 A stylesheet to normalize font-size
682
683 Repo: https://github.com/readium/readium-css */
684
685/* STYLES */
686
687/* :root is used so that you can quickly add a class or attribute if you prefer e.g. `:root[data-rs-normalize]` */
688
689/* We create a default so that you don’t need to explicitly set one in the DOM.
690 Once the “Publisher’s styles” checkbox is unchecked, the normalize is applied automatically */
691
692:root[style*="readium-advanced-on"] {
693 --USER__typeScale: 1.2; /* This is the default type scale you’ll find in most publications */
694}
695
696:root[style*="readium-advanced-on"] p,
697:root[style*="readium-advanced-on"] li,
698:root[style*="readium-advanced-on"] div,
699:root[style*="readium-advanced-on"] pre,
700:root[style*="readium-advanced-on"] dd {
701 font-size: 1rem !important;
702}
703
704:root[style*="readium-advanced-on"] h1 {
705 /* Fallback if browser doesn’t support vars */
706 font-size: 1.75rem !important;
707 font-size: calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
708}
709
710:root[style*="readium-advanced-on"] h2 {
711 /* Fallback if browser doesn’t support vars */
712 font-size: 1.5rem !important;
713 font-size: calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
714}
715
716:root[style*="readium-advanced-on"] h3 {
717 /* Fallback if browser doesn’t support vars */
718 font-size: 1.25rem !important;
719 font-size: calc(1rem * var(--USER__typeScale)) !important;
720}
721
722:root[style*="readium-advanced-on"] h4,
723:root[style*="readium-advanced-on"] h5,
724:root[style*="readium-advanced-on"] h6 {
725 font-size: 1rem !important;
726}
727
728:root[style*="readium-advanced-on"] small {
729 font-size: smaller !important;
730}
731
732:root[style*="readium-advanced-on"] sub,
733:root[style*="readium-advanced-on"] sup {
734 font-size: 67.5% !important;
735}
736
737/* The following styles kick in if you define the typeScale variable in the DOM.
738 No need to repeat declarations which don’t make use of the variable */
739
740:root[style*="readium-advanced-on"][style*="--USER__typeScale"] h1 {
741 font-size: calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
742}
743
744:root[style*="readium-advanced-on"][style*="--USER__typeScale"] h2 {
745 font-size: calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) !important;
746}
747
748:root[style*="readium-advanced-on"][style*="--USER__typeScale"] h3 {
749 font-size: calc(1rem * var(--USER__typeScale)) !important;
750}
751/*# sourceMappingURL=ReadiumCSS-after.css.map */
\No newline at end of file