about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2021-02-02 12:15:06 +0100
committerGitHub <noreply@github.com>2021-02-02 12:15:06 +0100
commitd2f96a9b64b3769006095357046f1ca328925fde (patch)
tree77bb322d392faa543435388f1776c0fc925c36cb /src
parent285524f8dafda8c8529660e02f4dca1d1e7f4446 (diff)
parent899b0dd1d1ed414f216c04b02d1b38a37a1a0f1b (diff)
downloadrust-d2f96a9b64b3769006095357046f1ca328925fde.tar.gz
rust-d2f96a9b64b3769006095357046f1ca328925fde.zip
Rollup merge of #81630 - GuillaumeGomez:overflow-sidebar-title-text, r=pickfire
Fix overflowing text on mobile when sidebar is displayed

Fixes #81597.

Before:

![Screenshot from 2021-02-01 17-21-15](https://user-images.githubusercontent.com/3050060/106486857-610b0300-64b2-11eb-96d3-12b939f5b661.png)

After:

![Screenshot from 2021-02-01 17-20-59](https://user-images.githubusercontent.com/3050060/106486840-5cdee580-64b2-11eb-9492-4df27bb39e59.png)

cc `@pickfire`
r? `@Nemo157`
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/rustdoc.css8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index d50fda278bd..422c57bcd3b 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -1490,6 +1490,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);
 	}