From 899b0dd1d1ed414f216c04b02d1b38a37a1a0f1b Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 1 Feb 2021 17:21:49 +0100 Subject: [PATCH] Fix overflowing text on mobile when sidebar is displayed --- src/librustdoc/html/static/rustdoc.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 8dad26dced956..f7b626cd6b985 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1489,6 +1489,14 @@ h4 > .notable-traits { background-color: rgba(0,0,0,0); height: 100%; } + /* + This allows to prevent the version text to overflow the sidebar title on mobile mode when the + sidebar is displayed (after clicking on the "hamburger" button). + */ + .sidebar.mobile > div.version { + overflow: hidden; + max-height: 33px; + } .sidebar { width: calc(100% + 30px); }