From 7eea9c39cf7a42b5914519e44fa660e14991851d Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Thu, 4 Jan 2024 12:08:06 -0800 Subject: [PATCH] docs: fix nav-bar on mobile The side nav-bar tweaks should only be valid when the side nav bar is present. It is only present on displays wider than 769px. --- docs/_static/custom.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/_static/custom.css b/docs/_static/custom.css index e95df7d..c9ba739 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -9,9 +9,11 @@ a { text-decoration: underline; } .wy-side-nav-search > a img.logo { width: 200px; } /* Some of our section titles are looong */ -.wy-nav-side, .wy-side-scroll, .wy-menu-vertical { width: 340px; } -.wy-side-nav-search { width: 325px; } -.wy-nav-content-wrap { margin-left: 340px; } +@media screen and (min-width:769px) { + .wy-nav-side, .wy-side-scroll, .wy-menu-vertical { width: 340px; } + .wy-side-nav-search { width: 325px; } + .wy-nav-content-wrap { margin-left: 340px; } +} /* We don't have a version picker widget */ .wy-nav-side { padding-bottom: 0; }