File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,14 +108,23 @@ font_scale_factor = settings["otherSettings"]["fontScaleFactor"]
108108"""
109109Custom Classes
110110"""
111- css_styles = """body { background-color: white; }
111+ if settings ["otherSettings" ]["theme" ] == "light" :
112+ bg = "white"
113+ text = "black"
114+ code_bg = "#f8f8f8"
115+ else :
116+ bg = "black"
117+ text = "white"
118+ code_bg = "#080808"
119+
120+ css_styles = """body { background-color:""" + bg + """; color:""" + text + """;}
112121pre { line-height: 125%; }
113122td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
114123span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
115124td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
116125span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
117126.codehilite .hll { background-color: #ffffcc }
118- .codehilite { background: #f8f8f8 ; }
127+ .codehilite { background: """ + code_bg + """ ; }
119128.codehilite .c { color: #3D7B7B; font-style: italic } /* Comment */
120129.codehilite .err { border: 1px solid #FF0000 } /* Error */
121130.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
You can’t perform that action at this time.
0 commit comments