@readium/css
Version:
A set of reference stylesheets for EPUB Reading Systems
52 lines (42 loc) • 1.77 kB
CSS
/* Readium CSS
A11y font pref
A submodule managing a11y text normalization for user settings
Part of “User Overrides” class – no flag required.
Repo: https://github.com/readium/css */
/* For AccessibleDfA, we need to normalize font-weight and font-style since only the normal style is available */
:root[style*="AccessibleDfA"] {
/* We won’t use the variable there since we need fallbacks for missing characters */
font-family: AccessibleDfA, Verdana, Tahoma, "Trebuchet MS", sans-serif ;
}
:root[style*="IA Writer Duospace"] {
/* We won’t use the variable there since we need fallbacks for missing characters */
font-family: "IA Writer Duospace", Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Courier, monospace ;
}
/* Maybe users want a setting to normalize any font offered so there is a “a11y Normalize” flag for it */
:root:--a11y-font,
:root:--a11y-normalize {
font-weight: normal ;
font-style: normal ;
}
/* Targeting everything except code. Note that Open Dyslexic has a monospaced font for code */
:root:--a11y-font *:not(code):not(var):not(kbd):not(samp),
:root:--a11y-normalize *:not(code):not(var):not(kbd):not(samp) {
font-family: inherit ;
font-weight: inherit ;
font-style: inherit ;
}
/* Normalizing text-decoration, subs and sups */
:root:--a11y-font *,
:root:--a11y-normalize * {
text-decoration: none ;
font-variant-caps: normal ;
font-variant-position: normal ;
font-variant-numeric: normal ;
}
:root:--a11y-font sup,
:root:--a11y-normalize sup,
:root:--a11y-font sub,
:root:--a11y-normalize sub {
font-size: 1rem ;
vertical-align: baseline ;
}