@readium/css
Version:
A set of reference stylesheets for EPUB Reading Systems
58 lines (44 loc) • 1.75 kB
CSS
/* Readium CSS
Custom colors pref
A submodule managing custom colors for user settings
Part of “Chrome Advanced” class – no flag required.
Repo: https://github.com/readium/css */
:root[style*="--USER__backgroundColor"] {
background-color: var(--USER__backgroundColor) ;
}
:root[style*="--USER__backgroundColor"] * {
background-color: transparent ;
}
:root[style*="--USER__textColor"] {
color: var(--USER__textColor) ;
}
/* The 2 following declarations are consistent with night mode */
:root[style*="--USER__textColor"] *:not(a) {
background-color: transparent ;
color: inherit ;
border-color: currentColor ;
}
:root[style*="--USER__textColor"] svg text {
fill: currentColor ;
stroke: none ;
}
/* Color of links (:link + :visited) */
:root[style*="--USER__linkColor"] a:link,
:root[style*="--USER__linkColor"] a:link * {
color: var(--USER__linkColor) ;
}
:root[style*="--USER__visitedColor"] a:visited,
:root[style*="--USER__visitedColor"] a:visited * {
color: var(--USER__visitedColor) ;
}
/* Color of ::selection */
/* This differs from the implementation inherited in base
as it is using !important and will override authors’ styles. */
:root[style*="--USER__selectionBackgroundColor"][style*="--USER__selectionTextColor"] ::-moz-selection {
background-color: var(--USER__selectionBackgroundColor) ;
color: var(--USER__selectionTextColor) ;
}
:root[style*="--USER__selectionBackgroundColor"][style*="--USER__selectionTextColor"] ::selection {
background-color: var(--USER__selectionBackgroundColor) ;
color: var(--USER__selectionTextColor) ;
}