From 379b5f0bc31205c29965bea068375101593c8c77 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Mon, 6 Sep 2021 19:50:58 +0100 Subject: [PATCH] Give sidebar a z-index This ensures that sidebar does not overlap with content when horizontal scrollbar is present. --- src/librustdoc/html/static/css/rustdoc.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 23ca6eeaf3bb9..f25097de2ace2 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -290,6 +290,12 @@ nav.sub { overflow: auto; } +.rustdoc:not(.source) .sidebar { + /* Ensure that sidebar does not overlap with content when horizontal + * scrollbar is present */ + z-index: 1; +} + /* Improve the scrollbar display on firefox */ * { scrollbar-width: initial;