Skip to content

Commit

Permalink
Override sphinx-tabs background color (#453)
Browse files Browse the repository at this point in the history
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 ]
  • Loading branch information
mellis13 authored Jan 10, 2024
1 parent 4f3a9a1 commit 9e550a8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/_static/custom_tab_style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.sphinx-tabs-panel {
background-color: inherit;
}

.sphinx-tabs-tab[aria-selected="true"] {
background-color: inherit;
}
11 changes: 11 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9e550a8

Please sign in to comment.