mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 11:53:27 +02:00
...
This commit is contained in:
parent
26618a2a9d
commit
a14bc99af6
1 changed files with 2 additions and 2 deletions
|
|
@ -123,11 +123,11 @@ def set_user_stylesheet(self):
|
|||
opts = config().parse()
|
||||
bg = opts.background_color or 'white'
|
||||
brules = ['background-color: %s !important'%bg]
|
||||
if opts.text_color:
|
||||
brules += ['color: %s !important'%opts.text_color]
|
||||
prefix = '''
|
||||
body { %s }
|
||||
'''%('; '.join(brules))
|
||||
if opts.text_color:
|
||||
prefix += '\n\nbody, p, div { color: %s !important }'%opts.text_color
|
||||
raw = prefix + opts.user_css
|
||||
raw = '::selection {background:#ffff00; color:#000;}\n'+raw
|
||||
data = 'data:text/css;charset=utf-8;base64,'
|
||||
|
|
|
|||
Loading…
Reference in a new issue