Skip to content

Commit 5465c67

Browse files
PGijsbersmfeurer
authored andcommitted
Overwrite default code highlighting styles in favor of something with more contrast. (#678)
1 parent 4152f91 commit 5465c67

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

doc/_static/codehighlightstyle.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.highlight .n { color: #000000 } /* code */
2+
.highlight .c1 { color: #1d8908 } /* comments */
3+
.highlight .mi { color: #0d9fe3; font-weight: bold } /* integers */
4+
.highlight .s1 { color: #d73c00 } /* string */
5+
.highlight .o { color: #292929 } /* operators */
6+
/* Background color for code highlights. Color for bash highlights */
7+
pre { background-color: #fbfbfb; color: #000000 }

doc/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
# Add any paths that contain custom static files (such as style sheets) here,
215215
# relative to this directory. They are copied after the builtin static files,
216216
# so a file named "default.css" will overwrite the builtin "default.css".
217-
html_static_path = []
217+
html_static_path = ["_static"]
218218

219219
# Add any extra paths that contain custom files (such as robots.txt or
220220
# .htaccess) here, relative to this directory. These files are copied
@@ -358,3 +358,7 @@
358358
'filename_pattern': '.*example.py$|.*tutorial.py$',
359359
# TODO: fix back/forward references for the examples.
360360
}
361+
362+
363+
def setup(app):
364+
app.add_stylesheet("codehighlightstyle.css")

0 commit comments

Comments
 (0)