From 1438caf529686e8d2d4f222a42e468a3f24a4d60 Mon Sep 17 00:00:00 2001 From: Benedikt McMullin Date: Thu, 5 Dec 2024 01:33:51 +0100 Subject: [PATCH] Style tweaks: add Override font-based normal line height (#12483) --- frontend/ui/data/css_tweaks.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index ae496b0cc..bd4daba60 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -478,6 +478,26 @@ sup { font-size: 50% !important; vertical-align: super !important; } sub { font-size: 50% !important; vertical-align: sub !important; } ]], }, + (function() + local sub_table = { + title = _("Override font-based normal line height"), + } + for __, height in ipairs( { 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 1.4, 1.45, 1.5 } ) do + table.insert(sub_table, { + id = T("normal_line-height_%1", height * 100), + conflicts_with = function(id) return util.stringStartsWith(id, "normal_line-height_") end, + title = T(_("Normal line height: %1"), height), + css = T([[ +* { + -cr-hint: late; + -cr-only-if: line-height-normal; + line-height: %1 !important; +} + ]], height), + }) + end + return sub_table + end)(), }, }, {