Skip to content

Commit 6683c04

Browse files
committed
Adjust spacings and sizing to improve behavior with over-long names
1 parent a1fd235 commit 6683c04

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

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

+12-6
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,18 @@ h1, h2, h3, h4 {
182182
"main-heading-breadcrumbs main-heading-breadcrumbs"
183183
"main-heading-h1 main-heading-toolbar"
184184
"main-heading-sub-heading main-heading-toolbar";
185-
grid-template-columns: 1fr max-content;
186-
grid-template-rows: 25px min-content min-content;
185+
grid-template-columns: minmax(105px, 1fr) minmax(0, max-content);
186+
grid-template-rows: minmax(25px, min-content) min-content min-content;
187187
padding-bottom: 6px;
188188
margin-bottom: 11px;
189189
}
190190
.rustdoc-breadcrumbs {
191191
grid-area: main-heading-breadcrumbs;
192-
height: 25px;
193192
line-height: 1.25;
194193
display: flex;
194+
flex-wrap: wrap;
195195
align-items: end;
196+
padding-top: 5px;
196197
}
197198
.rustdoc-breadcrumbs a {
198199
padding: 4px 0;
@@ -928,6 +929,7 @@ rustdoc-toolbar {
928929
display: flex;
929930
flex-direction: row;
930931
flex-wrap: nowrap;
932+
min-height: 60px;
931933
}
932934

933935
.docblock code, .docblock-short code,
@@ -1104,17 +1106,17 @@ table,
11041106
.search-results-title + .sub-heading {
11051107
color: var(--main-color);
11061108
display: flex;
1107-
align-items: center;
1109+
align-items: baseline;
1110+
white-space: nowrap;
11081111
}
11091112
#crate-search-div {
11101113
/* ensures that 100% in properties of #crate-search-div:after
11111114
are relative to the size of this div */
11121115
position: relative;
11131116
/* allows this div (and with it the <select>-element "#crate-search") to be shrunk */
1114-
min-width: 5em;
1117+
min-width: 0;
11151118
}
11161119
#crate-search {
1117-
min-width: 115px;
11181120
padding: 0 23px 0 4px;
11191121
/* prevents the <select> from overflowing the containing div in case it's shrunk */
11201122
max-width: 100%;
@@ -1825,6 +1827,7 @@ a.tooltip:hover::after {
18251827
margin-left: var(--button-left-margin);
18261828
display: flex;
18271829
line-height: 1.25;
1830+
min-width: 14px;
18281831
}
18291832
#sidebar-button {
18301833
display: none;
@@ -1861,6 +1864,9 @@ a.tooltip:hover::after {
18611864
width: 80px;
18621865
border-radius: var(--toolbar-button-border-radius);
18631866
}
1867+
#settings-menu > a, #help-button > a {
1868+
min-width: 0;
1869+
}
18641870
#sidebar-button > a {
18651871
background-color: var(--button-background-color);
18661872
border-color: var(--border-color);

0 commit comments

Comments
 (0)