mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DRYer
This commit is contained in:
parent
da53430e77
commit
ce33ebe682
@ -110,11 +110,7 @@ def apply_colors(is_content_popup):
|
||||
border-radius: 50%;\
|
||||
}
|
||||
'''
|
||||
|
||||
# reference mode hint box
|
||||
text += f'''\n\n
|
||||
.calibre-reference-mode [data-calibre-ref-num]::before {{
|
||||
content: attr(data-calibre-ref-num) !important;\
|
||||
hints_box_css = f'''
|
||||
display: inline-block !important;\
|
||||
position: absolute !important;\
|
||||
text-indent: 0 !important;\
|
||||
@ -125,6 +121,13 @@ def apply_colors(is_content_popup):
|
||||
cursor: default !important;\
|
||||
padding: 1px !important;\
|
||||
border: solid 1px {opts.color_scheme.foreground} !important;\
|
||||
'''
|
||||
|
||||
# reference mode hint box
|
||||
text += f'''\n\n
|
||||
.calibre-reference-mode [data-calibre-ref-num]::before {{
|
||||
content: attr(data-calibre-ref-num) !important;\
|
||||
{hints_box_css}
|
||||
}}
|
||||
'''
|
||||
|
||||
@ -132,17 +135,7 @@ def apply_colors(is_content_popup):
|
||||
text += f'''\n\n
|
||||
.calibre-hint-visible::before {{
|
||||
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: 1px !important;\
|
||||
border: solid 1px {opts.color_scheme.foreground} !important;\
|
||||
|
||||
{hints_box_css}
|
||||
}}
|
||||
|
||||
.calibre-hint-enter::before {{
|
||||
|
Loading…
x
Reference in New Issue
Block a user