Skip to content

Commit

Permalink
Fix style in boilerplate file and remove now-unnecessary Kindle compa…
Browse files Browse the repository at this point in the history
…tibility CSS
  • Loading branch information
acabal committed Jul 20, 2024
1 parent 91a2cea commit f20472b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
8 changes: 0 additions & 8 deletions se/data/templates/se-kindle.css

This file was deleted.

1 change: 1 addition & 0 deletions se/data/templates/se.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ section[epub|type~="titlepage"] p,
section[epub|type~="colophon"] h2,
section[epub|type~="imprint"] h2{
left: -999em;
position: absolute;
}

section[epub|type~="titlepage"] img{
Expand Down
4 changes: 0 additions & 4 deletions se/se_epub_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,10 +1303,6 @@ def build(self, run_epubcheck: bool, check_only: bool, build_kobo: bool, build_k
return

if build_kindle:
with open(work_compatible_epub_dir / "epub" / "css" / "se.css", "a", encoding="utf-8") as css_file:
with importlib.resources.files("se.data.templates").joinpath("se-kindle.css").open("r", encoding="utf-8") as compatibility_css_file:
css_file.write("\n\n" + compatibility_css_file.read())

# Kindle doesn't go more than 2 levels deep for ToC, so flatten it here.
with open(work_compatible_epub_dir / "epub" / toc_filename, "r+", encoding="utf-8") as file:
dom = se.easy_xml.EasyXmlTree(file.read())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ section[epub|type~="titlepage"] p,
section[epub|type~="colophon"] h2,
section[epub|type~="imprint"] h2{
left: -999em;
position: absolute;
}

section[epub|type~="titlepage"] img{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ section[epub|type~="titlepage"] p,
section[epub|type~="colophon"] h2,
section[epub|type~="imprint"] h2{
left: -999em;
position: absolute;
}

section[epub|type~="titlepage"] img{
Expand Down

0 comments on commit f20472b

Please sign in to comment.