diff --git a/base b/base index 6b6497871..60e47ac54 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 6b6497871ba269e25ac9b2be69e1c77a106ac4d8 +Subproject commit 60e47ac54e69a8503306654a55edc16f43214577 diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index 08c4eca45..48ee03dd2 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -419,8 +419,7 @@ This only works with footnotes that have specific attributes set by the publishe *[role~="doc-rearnote"] { -cr-hint: footnote-inpage; - margin-top: 0 !important; - margin-bottom: 0 !important; + margin: 0 !important; } ]], }, @@ -439,8 +438,7 @@ This only works with footnotes that have specific attributes set by the publishe *[role~="doc-rearnote"] { -cr-hint: footnote-inpage; - margin-top: 0 !important; - margin-bottom: 0 !important; + margin: 0 !important; font-size: 80% !important; } ]], @@ -453,8 +451,7 @@ This only works with footnotes that have specific attributes set by the publishe css = [[ ol.references > li { -cr-hint: footnote-inpage; - margin-top: 0 !important; - margin-bottom: 0 !important; + margin: 0 !important; } /* hide backlinks */ ol.references > li > .noprint { display: none; } @@ -468,8 +465,7 @@ ol.references > li > .mw-cite-backlink { display: none; } css = [[ ol.references > li { -cr-hint: footnote-inpage; - margin-top: 0 !important; - margin-bottom: 0 !important; + margin: 0 !important; font-size: 80% !important; } /* hide backlinks */ @@ -488,11 +484,10 @@ ol.references > li > .mw-cite-backlink { display: none; } Show footnotes with classic class names at the bottom of pages. This tweak can be duplicated as a user style tweak when books contain footnotes wrapped with other class names.]]), css = [[ -.footnote, .note, .note1, .ntb +.footnote, .note, .note1, .ntb, .ntb-txt, .ntb-txt-j { -cr-hint: footnote-inpage; - margin-top: 0 !important; - margin-bottom: 0 !important; + margin: 0 !important; } ]], }, @@ -503,11 +498,10 @@ This tweak can be duplicated as a user style tweak when books contain footnotes Show footnotes with classic classname at the bottom of pages. This tweak can be duplicated as a user style tweak when books contain footnotes wrapped with other class names.]]), css = [[ -.footnote, .note, .note1, .ntb +.footnote, .note, .note1, .ntb, .ntb-txt, .ntb-txt-j { -cr-hint: footnote-inpage; - margin-top: 0 !important; - margin-bottom: 0 !important; + margin: 0 !important; font-size: 80% !important; } ]], diff --git a/frontend/ui/widget/footnotewidget.lua b/frontend/ui/widget/footnotewidget.lua index 52135c402..00086d0b8 100644 --- a/frontend/ui/widget/footnotewidget.lua +++ b/frontend/ui/widget/footnotewidget.lua @@ -174,6 +174,11 @@ function FootnoteWidget:init() --
abc
def
: 3 lines, empty line in between -- Remove any attribute, let a
be a plain
self.html = self.html:gsub([[]*>]], [[
]]) + -- Elements with a id= attribute get a line above them (by some internal MuPDF + -- code, possibly generate_anchor() in html-layout.c). + -- Working around it with the following does not work: *[id] {margin-top: -1em;} + -- So, just rename the id= attribute, as we don't follow links in this popup. + self.html = self.html:gsub([[(<[^>]* )[iI][dD]=]], [[%1disabledID=]]) -- We may use a font size a bit smaller than the document one (because -- footnotes are usually smaller, and because NotoSans is a bit on the