From ed81477d50ff67d86f12c31c13e7e54a23320c80 Mon Sep 17 00:00:00 2001 From: Johannes Blaschke Date: Wed, 28 Mar 2018 14:31:19 -0700 Subject: [PATCH] get sphinx_rtd_theme's code-block to format properly --- .travis.yml | 7 +++++-- docs/source/_static/theme_overrides.css | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33aca91..a981ea2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,11 @@ python: - 3.6 install: - - pip install --user sphinx # sphinx_rtd_theme - - sudo python -m pip install https://github.com/rtfd/sphinx_rtd_theme/archive/master.zip -U + - pip install --user sphinx # sphinx_rtd_theme + # pypi's sphinx_rtd_theme is outdated. Internet recommends using current + # master. Note: at some point, it will be OK to add `sphinx_rtd_theme` to + # the `pip install` above => remove line below: + - python -m pip install --user https://github.com/rtfd/sphinx_rtd_theme/archive/master.zip -U script: bash ./build_and_deploy.sh diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css index 8623553..db92bab 100644 --- a/docs/source/_static/theme_overrides.css +++ b/docs/source/_static/theme_overrides.css @@ -9,6 +9,9 @@ overflow: visible; } +/* rtd_theme currently colours code-blocks in the pygments style (ie. green). + * This overrides this design choice with white. Note: future versions of the + * sphinx_rtd_theme might not need this HACK. */ .highlight { background: #ffffff; } -- GitLab