From bdbaa7dfdd5f9c49f99b7ef9eccbe6becfd79965 Mon Sep 17 00:00:00 2001 From: poire-z Date: Sat, 2 Jun 2018 13:30:49 +0200 Subject: [PATCH] bump crengine: HTML and rendering fixes (#3992) - Fix getting xpointer to current page - epub.css cleanup - fb2def.h update - Fix a few edge-case rendering issues - Fix border being drawn in spite of 'border-width: 0' Also update Wikipedia epub.css stylesheets regarding recent HTML fixes and enhancements. Remove "Remove all borders" workaround tweaks, as it's now fixed. (Unit tests failure to be fixed in upcoming commit) --- base | 2 +- frontend/ui/data/css_tweaks.lua | 15 +++------ frontend/ui/wikipedia.lua | 55 +++++++++++++++++++++++---------- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/base b/base index 35045d144..1b7e584a2 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 35045d144cb0d747632c0a819ff4b7b4ddd0ee75 +Subproject commit 1b7e584a27a460dc8375ad910cd2b92161776da9 diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index c06b1e832..aaf8c51bd 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -156,17 +156,10 @@ img { ]], }, }, - { - title = _("Workarounds"), - { - id = "border_all_none"; - title = _("Remove all borders"), - description = _("Work around a crengine bug that makes a border drawn when {border: black solid 0px}."), - -- css = [[* { border-style: none !important; }]], - -- Better to keep the layout implied by width, just draw them in white - css = [[* { border-color: white !important; }]], - }, - }, + -- No current need for workarounds + -- { + -- title = _("Workarounds"), + -- }, } return CssTweaks diff --git a/frontend/ui/wikipedia.lua b/frontend/ui/wikipedia.lua index ea457c58f..1a2956976 100644 --- a/frontend/ui/wikipedia.lua +++ b/frontend/ui/wikipedia.lua @@ -920,10 +920,7 @@ h1.koreaderwikifrontpage, h5.koreaderwikifrontpage { p.koreaderwikifrontpage { font-style: italic; font-size: 90%; - margin-left: 2em; - margin-right: 2em; - margin-top: 1em; - margin-bottom: 1em; + margin: 1em 2em 1em 2em; } hr.koreaderwikifrontpage { margin-left: 20%; @@ -941,28 +938,52 @@ a { a.newwikinonexistent { text-decoration: none; } +/* don't waste left margin for notes and list of pages */ +ul, ol { + margin-left: 0em; +} /* show a box around image thumbnails */ div.thumb { border: dotted 1px black; - margin-top: 0.5em; - margin-bottom: 0.5em; - margin-left: 2.5em; - margin-right: 2.5em; + margin: 0.5em 2.5em 0.5em 2.5em; + padding: 0.5em 0.5em 0.2em 0.5em; padding-top: ]].. (include_images and "0.5em" or "0.15em") .. [[; - padding-bottom: 0.2em; - padding-left: 0.5em; - padding-right: 0.5em; text-align: center; font-size: 90%; } -/* don't waste left margin for notes and list of pages */ -ul, ol { - margin-left: 0em; -} -/* avoid a line with a standalone bullet */ +/* show a box around image in gallery list (li.gallery + * is set up a bit differently than div.thumb - we try + * to make them look the same */ li.gallerybox { - display: inline; + list-style-type: none; + border: dotted 1px black; + margin: 0.5em 2.5em 0.5em 2.5em; + padding: 0.5em 0.5em 0.2em 0.5em; + padding-top: ]].. (include_images and "0.5em" or "0.15em") .. [[; + text-align: center; + font-size: 90%; +} +li.gallerybox div.thumb { + border: solid 1px white; + margin: 0; + padding: 0; +} +/* override this one often set in style="" with various values */ +li.gallerybox div.thumb div { + margin: 0 !important; +} +li.gallerybox div.gallerytext p { + text-align: center; + font-size: 90%; +} +.citation { + font-style: italic; +} +/* hide some view/edit/discuss short links displayed as "v m d" */ +.nv-view, .nv-edit, .nv-talk { + display: none; } +/* hiding .noprint may discard some interesting links */ ]]) -- ----------------------------------------------------------------