about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-04-22 18:14:37 +0200
committerGitHub <noreply@github.com>2021-04-22 18:14:37 +0200
commit7b6fd616c93fc8b7f8f445c58aa662738a4e5718 (patch)
treead1c2086f31136c54f29324babddf529364fa0aa
parent2f438e31f577bbb9367b9abbcbb5ce77ce54e979 (diff)
parentbb91805acefa32c2aedb769b1afe1f154b8e5dca (diff)
downloadrust-7b6fd616c93fc8b7f8f445c58aa662738a4e5718.tar.gz
rust-7b6fd616c93fc8b7f8f445c58aa662738a4e5718.zip
Rollup merge of #84376 - torhovland:issue-84534, r=GuillaumeGomez
Uses flex to fix formatting of h1 at any width

Fixes #84354.
-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..213ca9ec9e3 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -116,6 +116,8 @@ h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
 	padding-bottom: 6px;
 }
 h1.fqn {
+	display: flex;
+	width: 100%;
 	border-bottom: 1px dashed;
 	margin-top: 0;
 }
@@ -458,6 +460,13 @@ nav.sub {
 	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;
 }
@@ -1450,10 +1459,6 @@ h4 > .notable-traits {
 		padding: 0;
 	}
 
-	.content .in-band {
-		width: 100%;
-	}
-
 	.content h4 > .out-of-band {
 		position: inherit;
 	}