Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/sphinx/source/_static/tooltipster_color_theming.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* Overrides for sphinx-hoverxref since it does not support a native dark theme, see */
/* https://github.com/readthedocs/sphinx-hoverxref/issues/231 */
/* Inspired by https://github.com/pybamm-team/PyBaMM/pull/3083 */

/* These will ensure that the tooltip inherits the pydata-sphinx-theme colours */

.tooltipster-sidetip.tooltipster-shadow.tooltipster-shadow-custom .tooltipster-content {
background-color: var(--pst-color-background) !important;
color: var(--pst-color-text-base) !important;
}
2 changes: 2 additions & 0 deletions docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ def setup(app):
app.add_css_file("reference_format.css")
# Add a warning banner at the top of the page if viewing the "latest" docs
app.add_js_file("version-alert.js")
# Match the color theme of tooltips to PyData Sphinx Theme light/dark mode
app.add_css_file("tooltipster_color_theming.css")

# -- Options for LaTeX output ---------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ doc = [
'sphinx-toggleprompt == 0.5.2',
'sphinx-favicon',
'solarfactors',
'sphinx-hoverxref',
'sphinx-hoverxref ~= 1.4.2',
]
test = [
'pytest',
Expand Down