UNPKG

@readium/css

Version:

A set of reference stylesheets for EPUB Reading Systems

290 lines (254 loc) 11.1 kB
/*! * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. * Core maintainer: Jiminy Panoz <jiminy.panoz@edrlab.org> * Contributors: * Daniel Weck * Hadrien Gardeur * Innovimax * L. Le Meur * Mickaël Menu * k_taka */ :root[style*="--USER__textAlign"]{ text-align:var(--USER__textAlign); } :root[style*="--USER__textAlign"] body, :root[style*="--USER__textAlign"] p:not( blockquote p, figcaption p, header p, hgroup p, :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) ), :root[style*="--USER__textAlign"] li, :root[style*="--USER__textAlign"] dd{ text-align:var(--USER__textAlign) !important; -moz-text-align-last:auto !important; -epub-text-align-last:auto !important; text-align-last:auto !important; } :root[style*="--USER__bodyHyphens"]{ -webkit-hyphens:var(--USER__bodyHyphens) !important; -moz-hyphens:var(--USER__bodyHyphens) !important; -ms-hyphens:var(--USER__bodyHyphens) !important; -epub-hyphens:var(--USER__bodyHyphens) !important; hyphens:var(--USER__bodyHyphens) !important; } :root[style*="--USER__bodyHyphens"] body, :root[style*="--USER__bodyHyphens"] p, :root[style*="--USER__bodyHyphens"] li, :root[style*="--USER__bodyHyphens"] div, :root[style*="--USER__bodyHyphens"] dd{ -webkit-hyphens:inherit; -moz-hyphens:inherit; -ms-hyphens:inherit; -epub-hyphens:inherit; hyphens:inherit; } :root[style*="--USER__fontFamily"]{ font-family:var(--USER__fontFamily) !important; } :root[style*="--USER__fontFamily"] *{ font-family:revert !important; } :root[style*="AccessibleDfA"]{ font-family:AccessibleDfA, Verdana, Tahoma, "Trebuchet MS", sans-serif !important; } :root[style*="IA Writer Duospace"]{ font-family:"IA Writer Duospace", Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Courier, monospace !important; } :root[style*="AccessibleDfA"],:root[style*="IA Writer Duospace"], :root[style*="readium-a11y-on"]{ font-style:normal !important; font-weight:normal !important; } :root[style*="AccessibleDfA"] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp), :root[style*="readium-a11y-on"] body *:not(code):not(var):not(kbd):not(samp){ font-family:inherit !important; font-style:inherit !important; font-weight:inherit !important; } :root[style*="AccessibleDfA"] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a), :root[style*="readium-a11y-on"] body *:not(a){ text-decoration:none !important; } :root[style*="AccessibleDfA"] body *,:root[style*="IA Writer Duospace"] body *, :root[style*="readium-a11y-on"] body *{ font-variant-caps:normal !important; font-variant-numeric:normal !important; font-variant-position:normal !important; } :root[style*="AccessibleDfA"] sup,:root[style*="IA Writer Duospace"] sup, :root[style*="readium-a11y-on"] sup, :root[style*="AccessibleDfA"] sub, :root[style*="IA Writer Duospace"] sub, :root[style*="readium-a11y-on"] sub{ font-size:1rem !important; vertical-align:baseline !important; } :root:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] body{ zoom:var(--USER__zoom) !important; } :root[style*="readium-iOSPatch-on"][style*="--USER__zoom"] body{ -webkit-text-size-adjust:var(--USER__zoom) !important; } @supports selector(figure:has(> img)){ :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> img), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> video), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> svg), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> canvas), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> iframe), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> audio), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> img:only-child), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> video:only-child), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> svg:only-child), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> canvas:only-child), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> iframe:only-child), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> audio:only-child), :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] table{ zoom:calc(100% / var(--USER__zoom)) !important; } :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figcaption, :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] caption, :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] td, :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] th{ zoom:var(--USER__zoom) !important; } } :root[style*="--USER__lineHeight"]{ line-height:var(--USER__lineHeight) !important; } :root[style*="--USER__lineHeight"] body, :root[style*="--USER__lineHeight"] p, :root[style*="--USER__lineHeight"] li, :root[style*="--USER__lineHeight"] div{ line-height:inherit; } :root[style*="--USER__paraSpacing"] p{ margin-top:var(--USER__paraSpacing) !important; margin-bottom:var(--USER__paraSpacing) !important; } :root[style*="--USER__paraIndent"] p:not( blockquote p, figcaption p, header p, hgroup p, :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) ){ text-indent:var(--USER__paraIndent) !important; } :root[style*="--USER__paraIndent"] p *, :root[style*="--USER__paraIndent"] p:first-letter{ text-indent:0 !important; } :root[style*="--USER__wordSpacing"] h1, :root[style*="--USER__wordSpacing"] h2, :root[style*="--USER__wordSpacing"] h3, :root[style*="--USER__wordSpacing"] h4, :root[style*="--USER__wordSpacing"] h5, :root[style*="--USER__wordSpacing"] h6, :root[style*="--USER__wordSpacing"] p, :root[style*="--USER__wordSpacing"] li, :root[style*="--USER__wordSpacing"] div, :root[style*="--USER__wordSpacing"] dt, :root[style*="--USER__wordSpacing"] dd{ word-spacing:var(--USER__wordSpacing); } :root[style*="--USER__letterSpacing"] h1, :root[style*="--USER__letterSpacing"] h2, :root[style*="--USER__letterSpacing"] h3, :root[style*="--USER__letterSpacing"] h4, :root[style*="--USER__letterSpacing"] h5, :root[style*="--USER__letterSpacing"] h6, :root[style*="--USER__letterSpacing"] p, :root[style*="--USER__letterSpacing"] li, :root[style*="--USER__letterSpacing"] div, :root[style*="--USER__letterSpacing"] dt, :root[style*="--USER__letterSpacing"] dd{ letter-spacing:var(--USER__letterSpacing); font-variant:none; } :root[style*="--USER__fontWeight"] body{ font-weight:var(--USER__fontWeight) !important; } :root[style*="--USER__fontWeight"] b, :root[style*="--USER__fontWeight"] strong{ font-weight:bolder; } :root[style*="--USER__fontWidth"] body{ font-stretch:var(--USER__fontWidth) !important; } :root[style*="--USER__fontOpticalSizing"] body{ font-optical-sizing:var(--USER__fontOpticalSizing) !important; } :root[style*="readium-noRuby-on"] body rt, :root[style*="readium-noRuby-on"] body rp{ display:none; } :root[style*="--USER__ligatures"]{ font-variant-ligatures:var(--USER__ligatures) !important; } :root[style*="--USER__ligatures"] *{ font-variant-ligatures:inherit !important; } :root[style*="readium-iPadOSPatch-on"] body{ -webkit-text-size-adjust:none; } :root[style*="readium-iPadOSPatch-on"] p, :root[style*="readium-iPadOSPatch-on"] h1, :root[style*="readium-iPadOSPatch-on"] h2, :root[style*="readium-iPadOSPatch-on"] h3, :root[style*="readium-iPadOSPatch-on"] h4, :root[style*="readium-iPadOSPatch-on"] h5, :root[style*="readium-iPadOSPatch-on"] h6, :root[style*="readium-iPadOSPatch-on"] li, :root[style*="readium-iPadOSPatch-on"] th, :root[style*="readium-iPadOSPatch-on"] td, :root[style*="readium-iPadOSPatch-on"] dt, :root[style*="readium-iPadOSPatch-on"] dd, :root[style*="readium-iPadOSPatch-on"] pre, :root[style*="readium-iPadOSPatch-on"] address, :root[style*="readium-iPadOSPatch-on"] details, :root[style*="readium-iPadOSPatch-on"] summary, :root[style*="readium-iPadOSPatch-on"] figcaption, :root[style*="readium-iPadOSPatch-on"] div:not(:has(p, h1, h2, h3, h4, h5, h6, li, th, td, dt, dd, pre, address, aside, details, figcaption, summary)), :root[style*="readium-iPadOSPatch-on"] aside:not(:has(p, h1, h2, h3, h4, h5, h6, li, th, td, dt, dd, pre, address, aside, details, figcaption, summary)){ -webkit-text-zoom:reset; } :root[style*="readium-iPadOSPatch-on"] abbr, :root[style*="readium-iPadOSPatch-on"] b, :root[style*="readium-iPadOSPatch-on"] bdi, :root[style*="readium-iPadOSPatch-on"] bdo, :root[style*="readium-iPadOSPatch-on"] cite, :root[style*="readium-iPadOSPatch-on"] code, :root[style*="readium-iPadOSPatch-on"] dfn, :root[style*="readium-iPadOSPatch-on"] em, :root[style*="readium-iPadOSPatch-on"] i, :root[style*="readium-iPadOSPatch-on"] kbd, :root[style*="readium-iPadOSPatch-on"] mark, :root[style*="readium-iPadOSPatch-on"] q, :root[style*="readium-iPadOSPatch-on"] rp, :root[style*="readium-iPadOSPatch-on"] rt, :root[style*="readium-iPadOSPatch-on"] ruby, :root[style*="readium-iPadOSPatch-on"] s, :root[style*="readium-iPadOSPatch-on"] samp, :root[style*="readium-iPadOSPatch-on"] small, :root[style*="readium-iPadOSPatch-on"] span, :root[style*="readium-iPadOSPatch-on"] strong, :root[style*="readium-iPadOSPatch-on"] sub, :root[style*="readium-iPadOSPatch-on"] sup, :root[style*="readium-iPadOSPatch-on"] time, :root[style*="readium-iPadOSPatch-on"] u, :root[style*="readium-iPadOSPatch-on"] var{ -webkit-text-zoom:normal; } :root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{ -webkit-text-zoom:normal; }