From 9e550a818a2861d33d9b69d73fed233473a117ac Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Wed, 10 Jan 2024 14:48:28 -0800 Subject: [PATCH] Override sphinx-tabs background color (#453) The sphinx-tabs documentation extension uses a white background for the tabs component. This causes readability issues with the theme that we have chosen. A custom CSS has been added to override those components to inherit the overall theme color. [ committed by @mellis13 ] [ reviewed by @al-rigazzi ] --- doc/_static/custom_tab_style.css | 7 +++++++ doc/changelog.rst | 11 +++++++++++ doc/conf.py | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 doc/_static/custom_tab_style.css diff --git a/doc/_static/custom_tab_style.css b/doc/_static/custom_tab_style.css new file mode 100644 index 000000000..f31e13667 --- /dev/null +++ b/doc/_static/custom_tab_style.css @@ -0,0 +1,7 @@ +.sphinx-tabs-panel { + background-color: inherit; +} + +.sphinx-tabs-tab[aria-selected="true"] { + background-color: inherit; +} \ No newline at end of file diff --git a/doc/changelog.rst b/doc/changelog.rst index befb9ee37..8f7998ffd 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -17,6 +17,17 @@ Development branch To be released at some future point in time +- Override the sphinx-tabs extension background color + +Detailed Notes + +- The sphinx-tabs documentation extension uses a white background for the tabs component. + A custom CSS for those components to inherit the overall theme color has + been added. (SmartSim-PR453_) + +.. _SmartSim-PR453: https://github.com/CrayLabs/SmartSim/pull/453 + + 0.6.0 ----- diff --git a/doc/conf.py b/doc/conf.py index 908b9534f..7817d2f2e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -100,6 +100,11 @@ "extra_footer": extra_footer, } +# Use a custom style sheet to avoid the sphinx-tabs extension from using +# white background with dark themes. If sphinx-tabs updates its +# static/tabs.css, this may need to be updated. +html_css_files = ['custom_tab_style.css'] + autoclass_content = 'both' add_module_names = False