From 96ba30f754423e9b9befd6a17ac2b11995decec0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 15 Dec 2020 20:40:01 +0530 Subject: [PATCH] Hints should not cause reflow --- src/pyj/read_book/settings.pyj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pyj/read_book/settings.pyj b/src/pyj/read_book/settings.pyj index 6a2fe7f443..6f5914d40c 100644 --- a/src/pyj/read_book/settings.pyj +++ b/src/pyj/read_book/settings.pyj @@ -114,13 +114,16 @@ def apply_colors(is_content_popup): # follow links hint box text += f'''\n\n .calibre-hint-visible::before {{ - content: attr(data-calibre-hint-render);\ + content: attr(data-calibre-hint-render) !important;\ + display: inline-block !important;\ + position: absolute !important;\ + text-indent: 0 !important;\ text-decoration: none !important;\ font-weight: bold !important;\ color: {selfg} !important;\ background: {selbg} !important;\ cursor: default !important;\ - padding: 2px !important;\ + padding: 1px !important;\ border: solid 1px {opts.color_scheme.foreground} !important;\ }} '''