about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTor Hovland <tor.hovland@bekk.no>2021-04-20 22:31:48 +0200
committerTor Hovland <tor.hovland@bekk.no>2021-04-20 22:31:48 +0200
commita10d01be22819f21ae0011390f71fa3c3902d1e4 (patch)
tree544d8dd84082813ba9caaba5bbe57b437751a5b9 /src
parent6df26f897cffb2d86880544bb451c6b5f8509b2d (diff)
downloadrust-a10d01be22819f21ae0011390f71fa3c3902d1e4.tar.gz
rust-a10d01be22819f21ae0011390f71fa3c3902d1e4.zip
Uses flex to fix formatting of h1 at any width.
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/rustdoc.css13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 8f11dda2fb2..415bb608911 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -116,6 +116,9 @@ h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
 	padding-bottom: 6px;
 }
 h1.fqn {
+	display: flex;
+	gap: 8px;
+	width: 100%;
 	border-bottom: 1px dashed;
 	margin-top: 0;
 }
@@ -458,6 +461,12 @@ nav.sub {
 	font-weight: normal;
 }
 
+h1.fqn > .out-of-band {
+	float: unset;
+	flex: 1;
+	text-align: right;
+}
+
 h3.impl > .out-of-band {
 	font-size: 21px;
 }
@@ -1450,10 +1459,6 @@ h4 > .notable-traits {
 		padding: 0;
 	}
 
-	.content .in-band {
-		width: 100%;
-	}
-
 	.content h4 > .out-of-band {
 		position: inherit;
 	}