-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create-draft: Fix various template issues with --white-label option f…
…or better ereader compatibility
- Loading branch information
Showing
8 changed files
with
88 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* For legacy reading systems */ | ||
article, | ||
aside, | ||
figure, | ||
figcaption, | ||
footer, | ||
header, | ||
main, | ||
nav, | ||
section{ | ||
display: block; | ||
} | ||
|
||
/* Give PNGs a white background for night mode compatibility... */ | ||
img[epub|type~="se:image.color-depth.black-on-transparent"]{ | ||
background: #fff !important; /* `!important` is required to make sure readers respect the BG color */ | ||
} | ||
|
||
/* ...unless the device supports prefers-color-scheme. We’ll invert the image in core.css. RMSDK requires a target media as well as a state. */ | ||
@media all and (prefers-color-scheme){ | ||
img[epub|type~="se:image.color-depth.black-on-transparent"]:not([epub|type~="se:image.style.realistic"]){ | ||
background: transparent !important; | ||
} | ||
} | ||
|
||
/* Vertical align any MathML images we might have */ | ||
img.mathml{ | ||
vertical-align: middle; | ||
} | ||
|
||
/* As of 2020-09 hanging punctuation only works on iBooks. However, when it hangs over the page margin, it's | ||
not rendered. So here we simply remove it for iBooks, unless it's on an element that already has a margin | ||
like <blockquote> */ | ||
:root[__ibooks_internal_theme] blockquote + p, | ||
:root[__ibooks_internal_theme] h2 + p, | ||
:root[__ibooks_internal_theme] h3 + p, | ||
:root[__ibooks_internal_theme] h4 + p, | ||
:root[__ibooks_internal_theme] h5 + p, | ||
:root[__ibooks_internal_theme] h6 + p, | ||
:root[__ibooks_internal_theme] header + p, | ||
:root[__ibooks_internal_theme] hr + p, | ||
:root[__ibooks_internal_theme] ol + p, | ||
:root[__ibooks_internal_theme] ul + p, | ||
:root[__ibooks_internal_theme] table + p, | ||
:root[__ibooks_internal_theme] hgroup + p, | ||
:root[__ibooks_internal_theme] p:first-child{ | ||
hanging-punctuation: none !important; | ||
} | ||
|
||
:root[__ibooks_internal_theme] blockquote p:first-child{ | ||
hanging-punctuation: first last !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
@charset "utf-8"; | ||
@namespace epub "http://www.idpf.org/2007/ops"; | ||
|
||
h1{ | ||
margin-bottom: 1em; | ||
} | ||
|
||
#titlepage p{ | ||
font-variant: small-caps; | ||
section[epub|type~="titlepage"] p{ | ||
text-align: center; | ||
text-indent: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: https://standardebooks.org/vocab/1.0" xml:lang="en-US"> | ||
<head> | ||
<title>Table of Contents</title> | ||
</head> | ||
<body epub:type="frontmatter"> | ||
<nav id="toc" epub:type="toc"> | ||
<h2 epub:type="title">Table of Contents</h2> | ||
<ol> | ||
<li> | ||
<a href="text/titlepage.xhtml">Titlepage</a> | ||
</li> | ||
</ol> | ||
</nav> | ||
<nav id="landmarks" epub:type="landmarks"> | ||
<h2 epub:type="title">Landmarks</h2> | ||
<ol> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters