From c99f9fc5279f9554c9a43a7d96c85fb447d54bef Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 11 Aug 2025 23:32:55 +0200 Subject: [PATCH] Reduce height of nav bar when items don't fit in one line Since pydata-sphinx-theme is not making progress with reasonably displaying lot of content in the nav bar on medium-width screens, let's put the relatively simple workaround from https://github.com/pydata/pydata-sphinx-theme/pull/2117 into the mpl-sphinx-theme. --- mpl_sphinx_theme/static/css/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mpl_sphinx_theme/static/css/style.css b/mpl_sphinx_theme/static/css/style.css index fe65596..f307818 100644 --- a/mpl_sphinx_theme/static/css/style.css +++ b/mpl_sphinx_theme/static/css/style.css @@ -32,3 +32,11 @@ html[data-theme="dark"] { #navbar-icon-links .nav-link:hover { color: var(--pst-color-primary); } + +/* reduce height of nav bar when items don't fit in one line + See https://github.com/pydata/pydata-sphinx-theme/pull/2117 + */ +.navbar-item { + height: unset !important; + margin: 0.25rem 0; +} \ No newline at end of file