Skip to content

Commit

Permalink
rustdoc: Correctly handle long crate names on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 31, 2024
1 parent 5bd5d21 commit 83bfbbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1937,12 +1937,15 @@ in src-script.js and main.js
.mobile-topbar h2 {
padding-bottom: 0;
margin: auto 0.5em auto auto;
overflow: hidden;
/* Rare exception to specifying font sizes in rem. Since the topbar
height is specified in pixels, this also has to be specified in
pixels to avoid overflowing the topbar when the user sets a bigger
font size. */
font-size: 24px;
word-break: break-all;
/* In case the crate name is too long, we want users to be able to scroll the title. */
overflow: hidden auto;
max-height: 100%;
}

.mobile-topbar h2 a {
Expand Down

0 comments on commit 83bfbbe

Please sign in to comment.