Skip to content

Commit 83bfbbe

Browse files
rustdoc: Correctly handle long crate names on mobile
1 parent 5bd5d21 commit 83bfbbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/librustdoc/html/static/css/rustdoc.css

+4-1
Original file line numberDiff line numberDiff line change
@@ -1937,12 +1937,15 @@ in src-script.js and main.js
19371937
.mobile-topbar h2 {
19381938
padding-bottom: 0;
19391939
margin: auto 0.5em auto auto;
1940-
overflow: hidden;
19411940
/* Rare exception to specifying font sizes in rem. Since the topbar
19421941
height is specified in pixels, this also has to be specified in
19431942
pixels to avoid overflowing the topbar when the user sets a bigger
19441943
font size. */
19451944
font-size: 24px;
1945+
word-break: break-all;
1946+
/* In case the crate name is too long, we want users to be able to scroll the title. */
1947+
overflow: hidden auto;
1948+
max-height: 100%;
19461949
}
19471950

19481951
.mobile-topbar h2 a {

0 commit comments

Comments
 (0)