Skip to content

Commit 2e58633

Browse files
authored
Rollup merge of #84451 - torhovland:flex, r=jsha
Use flex more consistently Builds on #84376, related to #84354. - Fully replaces `float: right` with `flex` on `.content .out-of-band`. - Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.). Tested on various widths to make sure the pages behave as before.
2 parents 478a07d + 3090b01 commit 2e58633

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/librustdoc/html/static/rustdoc.css

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
117117
}
118118
h1.fqn {
119119
display: flex;
120-
width: 100%;
121120
border-bottom: 1px dashed;
122121
margin-top: 0;
122+
123+
/* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
124+
above the h1 */
125+
padding-left: 1px;
123126
}
124127
h1.fqn > .in-band > a:hover {
125128
text-decoration: underline;
@@ -453,20 +456,14 @@ nav.sub {
453456
}
454457

455458
.content .out-of-band {
456-
float: right;
459+
flex-grow: 0;
460+
text-align: right;
457461
font-size: 23px;
458462
margin: 0px;
459-
padding: 0px;
463+
padding: 0 0 0 12px;
460464
font-weight: normal;
461465
}
462466

463-
h1.fqn > .out-of-band {
464-
float: unset;
465-
flex: 1;
466-
text-align: right;
467-
margin-left: 8px;
468-
}
469-
470467
h3.impl > .out-of-band {
471468
font-size: 21px;
472469
}
@@ -486,6 +483,7 @@ h4 > code, h3 > code, .invisible > code {
486483
}
487484

488485
.content .in-band {
486+
flex-grow: 1;
489487
margin: 0px;
490488
padding: 0px;
491489
}
@@ -1484,10 +1482,6 @@ h4 > .notable-traits {
14841482
display: none !important;
14851483
}
14861484

1487-
h1.fqn {
1488-
overflow: initial;
1489-
}
1490-
14911485
.theme-picker {
14921486
left: 10px;
14931487
top: 54px;

0 commit comments

Comments
 (0)