From 8b0ea8cfc5b700f657dba967579a13cdaa0be4df Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 6 Mar 2025 13:16:30 -0300 Subject: [PATCH] Format and add CSS to epigraph --- src/epub/css/local.css | 57 ++++++++++++++++++++++++++++++++++++ src/epub/text/epigraph.xhtml | 3 +- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/epub/css/local.css b/src/epub/css/local.css index 6411abe..c85185a 100644 --- a/src/epub/css/local.css +++ b/src/epub/css/local.css @@ -5,3 +5,60 @@ [epub|type~="se:temperature"]{ font-variant: all-small-caps; } + +/* All epigraphs */ +[epub|type~="epigraph"]{ + font-style: italic; + hyphens: none; + -epub-hyphens: none; +} + +[epub|type~="epigraph"] em, +[epub|type~="epigraph"] i{ + font-style: normal; +} + +[epub|type~="epigraph"] cite{ + font-style: normal; + font-variant: small-caps; + margin-top: 1em; +} + +[epub|type~="epigraph"] cite i{ + font-style: italic; +} +/* End all epigraphs */ + +/* Full-page epigraphs */ +section[epub|type~="epigraph"]{ + text-align: center; +} + +section[epub|type~="epigraph"] > *{ + display: inline-block; + margin: auto; + margin-top: 3em; + max-width: 80%; + text-align: initial; +} + +@supports(display: flex){ + section[epub|type~="epigraph"]{ + align-items: center; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: center; + min-height: calc(98vh - 3em); + padding-top: 3em; + } + + section[epub|type~="epigraph"] > *{ + margin: 0; + } + + section[epub|type~="epigraph"] > * + *{ + margin-top: 3em; + } +} +/* End full-page epigraphs */ \ No newline at end of file diff --git a/src/epub/text/epigraph.xhtml b/src/epub/text/epigraph.xhtml index 1ffab55..fcf9cde 100644 --- a/src/epub/text/epigraph.xhtml +++ b/src/epub/text/epigraph.xhtml @@ -8,7 +8,8 @@
-

“Three thousand stadia from the earth to the moon.⁠ ⁠… Marvel not, my comrade, if I appear talking to you on super-terrestrial and aerial topics. The long and the short of the matter is that I am running over the order of a Journey I have lately made.”⁠—Lucian’s Icaromenippus

+

“Three thousand stadia from the earth to the moon.⁠ ⁠… Marvel not, my comrade, if I appear talking to you on super-terrestrial and aerial topics. The long and the short of the matter is that I am running over the order of a Journey I have lately made.”

+ Lucian’s Icaromenippus