Skip to content

Commit 96b3040

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

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/librustdoc/html/static/css/rustdoc.css

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,16 @@ 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;
194-
display: flex;
195193
align-items: end;
194+
padding-top: 5px;
196195
}
197196
.rustdoc-breadcrumbs a {
198197
padding: 4px 0;
@@ -928,6 +927,7 @@ rustdoc-toolbar {
928927
display: flex;
929928
flex-direction: row;
930929
flex-wrap: nowrap;
930+
min-height: 60px;
931931
}
932932

933933
.docblock code, .docblock-short code,
@@ -1104,17 +1104,17 @@ table,
11041104
.search-results-title + .sub-heading {
11051105
color: var(--main-color);
11061106
display: flex;
1107-
align-items: center;
1107+
align-items: baseline;
1108+
white-space: nowrap;
11081109
}
11091110
#crate-search-div {
11101111
/* ensures that 100% in properties of #crate-search-div:after
11111112
are relative to the size of this div */
11121113
position: relative;
11131114
/* allows this div (and with it the <select>-element "#crate-search") to be shrunk */
1114-
min-width: 5em;
1115+
min-width: 0;
11151116
}
11161117
#crate-search {
1117-
min-width: 115px;
11181118
padding: 0 23px 0 4px;
11191119
/* prevents the <select> from overflowing the containing div in case it's shrunk */
11201120
max-width: 100%;
@@ -1825,6 +1825,7 @@ a.tooltip:hover::after {
18251825
margin-left: var(--button-left-margin);
18261826
display: flex;
18271827
line-height: 1.25;
1828+
min-width: 14px;
18281829
}
18291830
#sidebar-button {
18301831
display: none;
@@ -1861,6 +1862,9 @@ a.tooltip:hover::after {
18611862
width: 80px;
18621863
border-radius: var(--toolbar-button-border-radius);
18631864
}
1865+
#settings-menu > a, #help-button > a {
1866+
min-width: 0;
1867+
}
18641868
#sidebar-button > a {
18651869
background-color: var(--button-background-color);
18661870
border-color: var(--border-color);

0 commit comments

Comments
 (0)