From 41bf5e02bc9f9398b37a9d874f6c94142c05252d Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Wed, 9 Sep 2020 21:21:02 -0500 Subject: [PATCH] Update core.css, add se.css, and update SE boilerplate files --- src/epub/content.opf | 1 + src/epub/css/core.css | 106 +++++--------------------------- src/epub/css/se.css | 93 ++++++++++++++++++++++++++++ src/epub/text/colophon.xhtml | 2 +- src/epub/text/imprint.xhtml | 2 +- src/epub/text/uncopyright.xhtml | 2 +- 6 files changed, 111 insertions(+), 95 deletions(-) create mode 100644 src/epub/css/se.css diff --git a/src/epub/content.opf b/src/epub/content.opf index 7d8234b..553c3a8 100644 --- a/src/epub/content.opf +++ b/src/epub/content.opf @@ -159,6 +159,7 @@ + diff --git a/src/epub/css/core.css b/src/epub/css/core.css index 4bfa99f..dbdb3b0 100644 --- a/src/epub/css/core.css +++ b/src/epub/css/core.css @@ -2,6 +2,7 @@ @namespace epub "http://www.idpf.org/2007/ops"; body{ + font-variant-numeric: oldstyle-nums; hyphens: auto; -epub-hyphens: auto; } @@ -29,7 +30,8 @@ h2, h3, h4, h5, -h6{ +h6, +hgroup{ font-variant: small-caps; hyphens: none; -epub-hyphens: none; @@ -39,6 +41,15 @@ h6{ margin: 3em 0; } +hgroup > *{ + font-weight: normal; + margin: 0; +} + +hgroup > *:first-child{ + font-weight: bold; +} + blockquote + p, h2 + p, h3 + p, @@ -50,7 +61,9 @@ hr + p, ol + p, ul + p, table + p, +hgroup + p, p:first-child{ + hanging-punctuation: first last; text-indent: 0; } @@ -107,94 +120,3 @@ a[epub|type~="noteref"]{ section[epub|type~="endnotes"] > ol > li{ margin: 1em 0; } - -section[epub|type~="colophon"], -section[epub|type~="imprint"]{ - text-align: center; -} - -section[epub|type~="colophon"] header, -section[epub|type~="imprint"] header{ - line-height: 0; - margin-top: 3em; -} - -section[epub|type~="colophon"] h2, -section[epub|type~="imprint"] h2{ - display: none; -} - -img[epub|type~="z3998:publisher-logo"]{ - max-width: 25%; -} - -section[epub|type~="colophon"] p, -section[epub|type~="imprint"] p{ - margin: 1em auto 0 auto; - text-indent: 0; -} - -section[epub|type~="imprint"] p{ - font-size: .75em; - text-align: justify; - width: 75%; -} - -section[epub|type~="colophon"] p + p::before{ - border-top: 1px solid; - content: ""; - display: block; - margin: auto auto 1em auto; - width: 25%; -} - -section[epub|type~="colophon"] a{ - font-variant: small-caps; -} - -section[epub|type~="imprint"] a, -section[epub|type~="colophon"] a{ - hyphens: none; - -epub-hyphens: none; -} - -section[epub|type~="copyright-page"] p{ - margin: 1em auto; - text-indent: 0; -} - -section[epub|type~="copyright-page"] blockquote p{ - font-style: italic; - text-align: left; - text-indent: 0; -} - -section[epub|type~="copyright-page"] blockquote p span{ - display: block; - padding-left: 1em; - text-indent: -1em; -} - -section[epub|type~="copyright-page"] blockquote br{ - display: none; -} - -@supports(display: flex){ - section[epub|type~="imprint"]{ - align-content: center; - display: flex; - flex-direction: column; - justify-content: center; - min-height: calc(98vh - 3em); - padding-top: 3em; - } - - section[epub|type~="imprint"] header{ - margin-bottom: 2em; - margin-top: 0; - } - - img[epub|type~="z3998:publisher-logo"]{ - max-width: 25vw; - } -} diff --git a/src/epub/css/se.css b/src/epub/css/se.css new file mode 100644 index 0000000..13d51b3 --- /dev/null +++ b/src/epub/css/se.css @@ -0,0 +1,93 @@ +@charset "utf-8"; +@namespace epub "http://www.idpf.org/2007/ops"; + +section[epub|type~="colophon"], +section[epub|type~="imprint"]{ + text-align: center; +} + +section[epub|type~="colophon"] header, +section[epub|type~="imprint"] header{ + line-height: 0; + margin-top: 3em; +} + +section[epub|type~="colophon"] h2, +section[epub|type~="imprint"] h2{ + display: none; +} + +img[epub|type~="z3998:publisher-logo"]{ + max-width: 25%; +} + +section[epub|type~="colophon"] p, +section[epub|type~="imprint"] p{ + margin: 1em auto 0 auto; + text-indent: 0; +} + +section[epub|type~="imprint"] p{ + font-size: .75em; + text-align: justify; + width: 75%; +} + +section[epub|type~="colophon"] p + p::before{ + border-top: 1px solid; + content: ""; + display: block; + margin: auto auto 1em auto; + width: 25%; +} + +section[epub|type~="colophon"] a{ + font-variant: small-caps; +} + +section[epub|type~="imprint"] a, +section[epub|type~="colophon"] a{ + hyphens: none; + -epub-hyphens: none; +} + +section[epub|type~="copyright-page"] p{ + margin: 1em auto; + text-indent: 0; +} + +section[epub|type~="copyright-page"] blockquote p{ + font-style: italic; + text-align: left; + text-indent: 0; +} + +section[epub|type~="copyright-page"] blockquote p span{ + display: block; + padding-left: 1em; + text-indent: -1em; +} + +section[epub|type~="copyright-page"] blockquote br{ + display: none; +} + +@supports(display: flex){ + section[epub|type~="imprint"]{ + align-content: center; + display: flex; + flex-direction: column; + justify-content: center; + min-height: calc(98vh - 3em); + padding-top: 3em; + } + + section[epub|type~="imprint"] header{ + margin-bottom: 2em; + margin-top: 0; + } + + img[epub|type~="z3998:publisher-logo"]{ + max-width: 25vw; + } +} diff --git a/src/epub/text/colophon.xhtml b/src/epub/text/colophon.xhtml index c4f3b2a..00bf3c7 100644 --- a/src/epub/text/colophon.xhtml +++ b/src/epub/text/colophon.xhtml @@ -3,7 +3,7 @@ Colophon - +
diff --git a/src/epub/text/imprint.xhtml b/src/epub/text/imprint.xhtml index 020b819..876fa5c 100644 --- a/src/epub/text/imprint.xhtml +++ b/src/epub/text/imprint.xhtml @@ -3,7 +3,7 @@ Imprint - +
diff --git a/src/epub/text/uncopyright.xhtml b/src/epub/text/uncopyright.xhtml index bd9c723..4386668 100644 --- a/src/epub/text/uncopyright.xhtml +++ b/src/epub/text/uncopyright.xhtml @@ -3,7 +3,7 @@ Uncopyright - +