UNPKG

@evidentpoint/readium-css

Version:

A set of reference stylesheets for EPUB Reading Systems

504 lines (384 loc) 6.78 kB
/* HTML5 Suggested rendering versus IE UA Stylesheet (version 11.0.9600.18698 — Win 8.1) IE 11 - Document mode = Edge (doctype html enables it) Source: https://www.w3.org/TR/html5/rendering.html */ @namespace url(http://www.w3.org/1999/xhtml); /* 001 Hidden elements */ [hidden], head, meta, noscript, script, style, title { display: none; } link, template, rp, source { display: inline; } /* 002 Page */ html, body { display: block; } /* 003 Flow content */ address, blockquote, div, figure, figcaption, footer, form, header, hr, 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: baseline; } sup { vertical-align: baseline; } 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: 0.5em; /* text-emphasis not implemented */ } 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: normal; white-space: normal; } nobr { white-space: nowrap; } wbr { content: normal; } 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, form, hr, legend, p, pre, h1, h2, h3, h4, h5, h6, main, table, caption, colgroup, col, thead, tbody, tfoot, tr, td, th, dd, dl, dt, ol, ul, li, bdi, [dir=ltr i], [dir=rtl i], [dir=auto i] { unicode-bidi: normal; } /* Fot the following elements, dir attribute won’t make any difference */ figure, figcaption, footer, header, article, aside, nav, section { 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; } 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: 1px solid rgb(230, 230, 230); padding: 0.1875em 0.25em 0.1875em; } legend { padding-left: 2px; padding-right: 2px; } /* 013 Embedded content */ iframe { border: 2px inset; } video { /* object-fit won’t be implemented in Trident */ } canvas { } audio[controls] { width: 532px; height: 74px; } video[controls] { } /* 014 Images */ img { }