@evidentpoint/readium-css
Version:
A set of reference stylesheets for EPUB Reading Systems
505 lines (385 loc) • 6.62 kB
CSS
/* HTML5 Suggested rendering versus Edge UA Stylesheet (version 40 — Win10)
Source: https://www.w3.org/TR/html5/rendering.html */
@namespace url(http://www.w3.org/1999/xhtml);
/* 001
Hidden elements */
[hidden], head, meta, rp, script, noscript, source, style, template, title {
display: none;
}
link {
display: inline;
}
/* 002
Page */
html, body {
display: block;
}
/* 003
Flow content */
address, blockquote, div, figure, figcaption, footer, form,
header, hr, legend, p, pre {
display: block;
}
legend {
display: inline;
}
blockquote, figure, p, pre {
margin-top: 1em;
margin-bottom: 1em;
}
blockquote, figure {
margin-left: 40px;
margin-right: 40px;
}
address {
font-style: italic;
}
pre {
font-family: monospace;
white-space: pre;
}
/* 004
Phrasing content */
cite, dfn, em, i, var {
font-style: italic;
}
b, strong {
font-weight: bold;
}
code, kbd, samp, tt {
font-family: monospace;
}
big {
font-size: larger;
}
small {
font-size: smaller;
}
sub {
vertical-align: sub;
}
sup {
vertical-align: super;
}
sub, sup {
line-height: normal;
font-size: small;
}
ruby {
display: ruby;
}
rb {
display: inline;
white-space: normal;
}
rt {
display: ruby-text;
white-space: normal;
font-size: 50%;
/* text-emphasis not implemented yet */
}
rbc {
display: inline;
}
rtc {
display: inline;
}
ruby, rb, rt, rbc, rtc {
unicode-bidi: normal;
}
:link {
color: rgb(0, 102, 204);
}
:visited {
color: rgb(0, 102, 204); /* Visually different but same style in inspector… */
}
:link, :visited {
text-decoration: underline;
}
a:link[rel~=help], a:visited[rel~=help],
area:link[rel~=help], area:visited[rel~=help] {
}
:focus {
outline: 2px dotted; /* Can’t retrieve via inspector */
}
mark {
background: yellow;
color: black;
}
abbr[title], acronym[title] {
text-decoration: none;
}
ins, u {
text-decoration: underline;
}
del, s, strike {
text-decoration: line-through;
}
blink {
text-decoration: none;
}
q::before {
content: open-quote;
}
q::after {
content: close-quote;
}
br {
content: ;
white-space: normal;
}
nobr {
white-space: nowrap;
}
wbr {
content: ;
}
nobr wbr {
white-space: inherit;
}
/* 005
Bidirectional text */
[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:dir(ltr) {
direction: ltr;
}
[dir]:dir(rtl), bdi:dir(rtl) {
direction: rtl;
}
address, blockquote, div, footer, form,
hr, legend, p, pre, h1, h2, h3, h4, h5, h6,
table, caption, colgroup, col, thead, tbody,
tfoot, tr, td, th, dd, dl, dt, ol, ul, li, [dir=ltr i], [dir=rtl i], [dir=auto i] {
unicode-bidi: normal;
}
figure, figcaption, footer,
header, article, aside,
main, nav, section,
bdi {
unicode-bidi: embed;
}
bdo, bdo[dir] {
unicode-bidi: bidi-override;
}
textarea[dir=auto i], input[type=text][dir=auto i], input[type=search][dir=auto i],
input[type=tel][dir=auto i], input[type=url][dir=auto i], input[type=email][dir=auto i],
pre[dir=auto i] {
unicode-bidi: normal;
}
/* 006
Quotes */
/* 007
Section and headings */
article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
display: block;
}
h1 {
margin-top: 0.67em;
margin-bottom: 0.67em;
font-size: 2.00em;
font-weight: bold;
}
h2 {
margin-top: 0.83em;
margin-bottom: 0.83em;
font-size: 1.50em;
font-weight: bold;
}
h3 {
margin-top: 1.00em;
margin-bottom: 1.00em;
font-size: 1.17em;
font-weight: bold;
}
h4 {
margin-top: 1.33em;
margin-bottom: 1.33em;
font-size: 1.00em;
font-weight: bold;
}
h5 {
margin-top: 1.67em;
margin-bottom: 1.67em;
font-size: 0.83em;
font-weight: bold;
}
h6 {
margin-top: 2.33em;
margin-bottom: 2.33em;
font-size: 0.67em;
font-weight: bold;
}
/* x = article, aside, nav or section */
x h1 {
margin-top: 0.83em;
margin-bottom: 0.83em;
font-size: 1.50em;
}
x x h1 {
margin-top: 1.00em;
margin-bottom: 1.00em;
font-size: 1.17em;
}
x x x h1 {
margin-top: 1.33em;
margin-bottom: 1.33em;
font-size: 1.00em;
}
x x x x h1 {
margin-top: 1.67em;
margin-bottom: 1.67em;
font-size: 0.83em;
}
x x x x x h1 {
margin-top: 2.33em;
margin-bottom: 2.33em;
font-size: 0.67em;
}
/* 008
Lists */
dd, dl, dt, ol, ul {
display: block;
}
li {
display: list-item;
}
dl, ol, ul {
margin-top: 1em;
margin-bottom: 1em;
}
dl dl, dl ol, dl ul,
ol dl, ul dl {
margin-top: 1em;
margin-bottom: 1em;
}
ol ol, ol ul,
ul ol, ul ul {
margin-top: 0;
margin-bottom: 0;
}
dd {
margin-left: 40px;
}
ol, ul {
padding-left: 40px;
}
ol {
list-style-type: decimal;
}
ul {
list-style-type: disc;
}
ol ul, ul ul {
list-style-type: circle;
}
ol ol ul, ol ul ul,
ul ol ul, ul ul ul {
list-style-type: square;
}
/* 009
Tables */
table {
display: table;
}
caption {
display: table-caption;
}
colgroup {
display: table-column-group;
}
col {
display: table-column;
}
thead {
display: table-header-group;
}
tbody {
display: table-row-group;
}
tfoot {
display: table-footer-group;
}
tr {
display: table-row;
}
td, th {
display: table-cell;
}
colgroup[hidden], col[hidden], thead[hidden], tbody[hidden],
tfoot[hidden], tr[hidden], td[hidden], th[hidden] {
visibility: visible;
display: none;
}
table {
box-sizing: border-box;
border-spacing: 2px;
border-collapse: separate;
text-indent: 0;
}
td, th {
padding: 1px;
}
th {
font-weight: bold;
text-align: center;
}
thead, tbody, tfoot, table > tr {
vertical-align: middle;
}
tr, td, th {
vertical-align: inherit;
}
table, td, th {
}
thead, tbody, tfoot, tr {
}
/* 010
Form controls */
input, select, option, optgroup, button, textarea, keygen {
text-indent: 0;
}
textarea {
white-space: pre-wrap;
}
input[type="radio"], input[type="checkbox"], input[type="reset"], input[type="button"],
input[type="submit"], select, button {
box-sizing: border-box;
}
/* 011
hr element */
hr {
border-style: inset;
border-width: 1px;
margin: 0.5em auto;
}
/* 012
Fieldset and legend */
fieldset {
margin-left: 2px;
margin-right: 2px;
border: 2px groove;
padding: 0.35em 0.625em 0.75em;
}
legend {
padding-left: 2px;
padding-right: 2px;
}
/* 013
Embedded content */
iframe {
border: 2px inset;
}
video {
/* Object-fit not implemented yet */
}
canvas {
}
audio[controls] {
width: 300px;
height: 30px;
}
video[controls] {
}
/* 014
Images */
img {
}