This commit is contained in:
Kovid Goyal 2012-08-27 00:37:32 +05:30
parent 26618a2a9d
commit a14bc99af6

View File

@ -123,11 +123,11 @@ class Document(QWebPage): # {{{
opts = config().parse() opts = config().parse()
bg = opts.background_color or 'white' bg = opts.background_color or 'white'
brules = ['background-color: %s !important'%bg] brules = ['background-color: %s !important'%bg]
if opts.text_color:
brules += ['color: %s !important'%opts.text_color]
prefix = ''' prefix = '''
body { %s } body { %s }
'''%('; '.join(brules)) '''%('; '.join(brules))
if opts.text_color:
prefix += '\n\nbody, p, div { color: %s !important }'%opts.text_color
raw = prefix + opts.user_css raw = prefix + opts.user_css
raw = '::selection {background:#ffff00; color:#000;}\n'+raw raw = '::selection {background:#ffff00; color:#000;}\n'+raw
data = 'data:text/css;charset=utf-8;base64,' data = 'data:text/css;charset=utf-8;base64,'