Skip to content

Commit

Permalink
rustdoc: reduce clutter on mobile search page
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Jan 13, 2025
1 parent 7386d5b commit 39c5d7e
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ h1, h2, h3, h4 {
more aggressively when we want them to. */
overflow-wrap: anywhere;
}
.search-results-main-heading nav.sub {
grid-area: main-heading-h1;
}
.main-heading {
position: relative;
display: grid;
Expand All @@ -192,6 +189,17 @@ h1, h2, h3, h4 {
padding-bottom: 6px;
margin-bottom: 15px;
}
.search-results-main-heading {
grid-template-areas:
"main-heading-breadcrumbs main-heading-placeholder"
"main-heading-breadcrumbs main-heading-toolbar "
"main-heading-h1 main-heading-toolbar ";
}
.search-results-main-heading nav.sub {
grid-area: main-heading-h1;
align-items: end;
margin: 4px 0 8px 0;
}
.rustdoc-breadcrumbs {
grid-area: main-heading-breadcrumbs;
line-height: 1.25;
Expand All @@ -202,12 +210,13 @@ h1, h2, h3, h4 {
}
.search-switcher {
grid-area: main-heading-breadcrumbs;
line-height: 1.25;
line-height: 1.5;
display: flex;
color: var(--main-color);
align-items: baseline;
white-space: nowrap;
margin-top: -1px;
padding-top: 8px;
min-height: 34px;
}
.rustdoc-breadcrumbs a {
padding: 4px 0;
Expand Down Expand Up @@ -2327,12 +2336,28 @@ However, it's not needed with smaller screen width because the doc/code block is
"main-heading-h1 main-heading-toolbar"
"main-heading-sub-heading main-heading-toolbar";
}
.search-results-main-heading {
display: grid;
grid-template-areas:
"main-heading-breadcrumbs main-heading-toolbar"
"main-heading-breadcrumbs main-heading-toolbar"
"main-heading-h1 main-heading-toolbar";
}
rustdoc-toolbar {
display: grid;
grid-template-areas:
"x settings help"
"search summary summary";
}
.search-results-main-heading rustdoc-toolbar {
display: grid;
grid-template-areas:
"settings help"
"search search";
}
.search-results-main-heading #toggle-all-docs {
display: none;
}
rustdoc-toolbar .settings-menu span.label,
rustdoc-toolbar .help-menu span.label
{
Expand Down Expand Up @@ -2409,6 +2434,13 @@ in src-script.js and main.js
"main-heading-h1 main-heading-toolbar"
"main-heading-sub-heading main-heading-toolbar";
}
.search-results-main-heading {
display: grid;
grid-template-areas:
"main-heading-breadcrumbs main-heading-placeholder"
"main-heading-breadcrumbs main-heading-toolbar"
"main-heading-h1 main-heading-toolbar";
}
rustdoc-topbar span.label,
rustdoc-toolbar .settings-menu,
rustdoc-toolbar .help-menu
Expand Down

0 comments on commit 39c5d7e

Please sign in to comment.