Hints should not cause reflow

This commit is contained in:
Kovid Goyal 2020-12-15 20:40:01 +05:30
parent d88e7788c3
commit 96ba30f754
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -114,13 +114,16 @@ def apply_colors(is_content_popup):
# follow links hint box # follow links hint box
text += f'''\n\n text += f'''\n\n
.calibre-hint-visible::before {{ .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;\ text-decoration: none !important;\
font-weight: bold !important;\ font-weight: bold !important;\
color: {selfg} !important;\ color: {selfg} !important;\
background: {selbg} !important;\ background: {selbg} !important;\
cursor: default !important;\ cursor: default !important;\
padding: 2px !important;\ padding: 1px !important;\
border: solid 1px {opts.color_scheme.foreground} !important;\ border: solid 1px {opts.color_scheme.foreground} !important;\
}} }}
''' '''