UNPKG

@evidentpoint/readium-css

Version:

A set of reference stylesheets for EPUB Reading Systems

513 lines (397 loc) 6.94 kB
/* HTML5 Suggested rendering versus Safari UA Stylesheet (Version 11 - iOS) Source: https://www.w3.org/TR/html5/rendering.html */ @namespace url(http://www.w3.org/1999/xhtml); /* 001 Hidden elements */ [hidden], head, link, meta, rp, script, source, style, template, title { display: none; } noscript { 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; } 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 { font-size: smaller; } ruby { display: inline; text-indent: 0; } rb { display: inline; white-space: normal; } rt { display: block; white-space: normal; font-size: -webkit-ruby-text; text-indent: 0; -webkit-text-emphasis-style: none; -webkit-text-emphasis-color: initial; text-align: start; } rbc { display: inline; } rtc { display: inline; } ruby, rb, rt, rbc, rtc { unicode-bidi: normal; } :link { color: -webkit-link; } :visited { color: -webkit-link; } :link, :visited { text-decoration: underline; } a:link[rel~=help], a:visited[rel~=help], area:link[rel~=help], area:visited[rel~=help] { } :focus { outline-color: -webkit-focus-ring-color; outline-style: auto; outline-width: 5px; } 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, figure, figcaption, footer, form, header, hr, legend, p, pre, article, aside, h1, h2, h3, h4, h5, h6, main, nav, section, table, caption, colgroup, col, thead, tbody, tfoot, tr, td, th, dd, dl, dt, ol, ul, li { unicode-bidi: normal; } [dir=ltr i], [dir=rtl i], [dir=auto i] { unicode-bidi: embed; } bdi, bdi[dir] { unicode-bidi: -webkit-isolate; } bdo, bdo[dir] { unicode-bidi: bidi-override; } textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: -webkit-plaintext; } 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] { unicode-bidi: -webkit-isolate; } /* 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; text-align: -webkit-match-parent; } 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; text-align: -webkit-center; } 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: content-box; border-spacing: 2px; border-collapse: separate; text-indent: 0; } td, th { padding: 1px; } th { font-weight: bold; } thead, tbody, tfoot { vertical-align: middle; } tr, td, th { vertical-align: inherit; } table { border-color: gray; } thead, tbody, tfoot, tr { border-color: inherit; } /* 010 Form controls */ input, select, button, textarea, keygen { text-indent: 0px; } 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 threedface; padding: 0.35em 0.625em 0.75em; min-width: -webkit-min-content; } legend { padding-left: 2px; padding-right: 2px; border: initial; } /* 013 Embedded content */ iframe { border: 2px inset; } video { object-fit: contain; -webkit-tap-highlight-color: transparent; } canvas { } audio[controls] { min-width: 260px; height: 39px; } video[controls] { -webkit-user-select: none; } /* 014 Images */ img { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }