about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2021-04-29 19:27:20 -0400
committerGitHub <noreply@github.com>2021-04-29 19:27:20 -0400
commit2e586334122f266dd24ff02eee5b6b4beeac2f9b (patch)
treecfd431a638e026654b4f7c2df537ca485954d470 /src/librustdoc/html
parent478a07df05e3fe8df964291d8b25dd80b7e0e76b (diff)
parent3090b0151c896dd47dedcbd26f1223a534f55f17 (diff)
downloadrust-2e586334122f266dd24ff02eee5b6b4beeac2f9b.tar.gz
rust-2e586334122f266dd24ff02eee5b6b4beeac2f9b.zip
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.
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/static/rustdoc.css22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index a024fa49b0e..7a49025f9b2 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -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;
@@ -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;
 }
@@ -486,6 +483,7 @@ h4 > code, h3 > code, .invisible > code {
 }
 
 .content .in-band {
+	flex-grow: 1;
 	margin: 0px;
 	padding: 0px;
 }
@@ -1484,10 +1482,6 @@ h4 > .notable-traits {
 		display: none !important;
 	}
 
-	h1.fqn {
-		overflow: initial;
-	}
-
 	.theme-picker {
 		left: 10px;
 		top: 54px;