Skip to content

Commit

Permalink
Rollup merge of rust-lang#84451 - torhovland:flex, r=jsha
Browse files Browse the repository at this point in the history
Use flex more consistently

Builds on rust-lang#84376, related to rust-lang#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.
  • Loading branch information
jackh726 authored Apr 29, 2021
2 parents 18587b1 + 3090b01 commit 6d18bcf
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
}
h1.fqn {
display: flex;
width: 100%;
border-bottom: 1px dashed;
margin-top: 0;

/* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
above the h1 */
padding-left: 1px;
}
h1.fqn > .in-band > a:hover {
text-decoration: underline;
Expand Down Expand Up @@ -453,20 +456,14 @@ nav.sub {
}

.content .out-of-band {
float: right;
flex-grow: 0;
text-align: right;
font-size: 23px;
margin: 0px;
padding: 0px;
padding: 0 0 0 12px;
font-weight: normal;
}

h1.fqn > .out-of-band {
float: unset;
flex: 1;
text-align: right;
margin-left: 8px;
}

h3.impl > .out-of-band {
font-size: 21px;
}
Expand All @@ -486,6 +483,7 @@ h4 > code, h3 > code, .invisible > code {
}

.content .in-band {
flex-grow: 1;
margin: 0px;
padding: 0px;
}
Expand Down Expand Up @@ -1484,10 +1482,6 @@ h4 > .notable-traits {
display: none !important;
}

h1.fqn {
overflow: initial;
}

.theme-picker {
left: 10px;
top: 54px;
Expand Down

0 comments on commit 6d18bcf

Please sign in to comment.