From fd5e4df142c877a3a93ca7fea7d18254032019de Mon Sep 17 00:00:00 2001 From: poire-z Date: Fri, 19 Jul 2019 21:44:39 +0200 Subject: [PATCH] Style tweaks: adds Ignore all vertical/horizontal margins/paddings Provides a bit more granularity than the generic "Ignore all publisher margins" - and allow the same for paddings for books that wrongly use paddings for that effect. --- frontend/ui/data/css_tweaks.lua | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index d4dcb7ce8..350d3f1d8 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -21,10 +21,31 @@ local CssTweaks = { css = [[body { margin: 0 !important; }]], }, { - id = "margin_all_0"; - title = _("Ignore all publisher margins"), - priority = 2, - css = [[* { margin: 0 !important; }]], + title = _("Ignore margins and paddings"), + { + id = "margin_horizontal_all_0"; + title = _("Ignore all horizontal margins"), + priority = 2, + css = [[* { margin-left: 0 !important; margin-right: 0 !important; }]], + }, + { + id = "margin_vertical_all_0"; + title = _("Ignore all vertical margins"), + priority = 2, + css = [[* { margin-top: 0 !important; margin-bottom: 0 !important; }]], + }, + { + id = "padding_horizontal_all_0"; + title = _("Ignore all horizontal paddings"), + priority = 2, + css = [[* { padding-left: 0 !important; padding-right: 0 !important; }]], + }, + { + id = "padding_vertical_all_0"; + title = _("Ignore all vertical paddings"), + priority = 2, + css = [[* { padding-top: 0 !important; padding-bottom: 0 !important; }]], + }, separator = true, }, {