Skip to content

Commit

Permalink
Make mobile phone layout smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Aug 25, 2024
1 parent 26c585e commit 624e4b5
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1746,10 +1746,9 @@ a.tooltip:hover::after {
align-items: center;
justify-content: center;
flex-direction: column;
background-color: var(--button-background-color);
border: 1px solid transparent;
border-radius: var(--button-border-radius);
color: var(--settings-button-color);
color: var(--main-color);
}
#settings-menu > a, #help-button > a, button#toggle-all-docs {
width: 80px;
Expand Down Expand Up @@ -1815,10 +1814,12 @@ button#toggle-all-docs:before,
margin: 8px;
}

button#toggle-all-docs:hover:before,
#help-button:hover > a:before,
#settings-menu:hover > a:before {
filter: var(--settings-menu-hover-filter);
@media not (pointer: coarse) {
button#toggle-all-docs:hover:before,
#help-button > a:hover:before,
#settings-menu > a:hover:before {
filter: var(--settings-menu-hover-filter);
}
}

rustdoc-toolbar span.label {
Expand Down Expand Up @@ -2102,6 +2103,17 @@ in src-script.js and main.js
scroll-margin-top: 45px;
}

/* Text label takes up too much space at this size. */
rustdoc-toolbar span.label {
display: none;
}
#settings-menu > a, #help-button > a, button#toggle-all-docs {
width: 33px;
}
#settings.popover {
--popover-arrow-offset: 46px;
}

.rustdoc {
/* Sidebar should overlay main content, rather than pushing main content to the right.
Turn off `display: flex` on the body element. */
Expand Down

0 comments on commit 624e4b5

Please sign in to comment.