about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-11-25 22:06:22 -0700
committerMichael Howell <michael@notriddle.com>2022-11-25 22:06:22 -0700
commit8b001b4da0716936e0ca32303cc0e3c5e53e42f8 (patch)
treed9c573b8a67c7c74e9f0e32aab2916b85a1caab2
parentaff003becd8b6bf803202e958623031274ad69c9 (diff)
downloadrust-8b001b4da0716936e0ca32303cc0e3c5e53e42f8.tar.gz
rust-8b001b4da0716936e0ca32303cc0e3c5e53e42f8.zip
rustdoc: use flexbox CSS to align sidebar button instead of position
This accomplishes the same thing with significantly less code.
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 063082c1c7c..6574155ce58 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1328,8 +1328,8 @@ a.test-arrow:hover {
 	border-bottom: 1px solid;
 	display: flex;
 	height: 40px;
-	justify-content: center;
-	align-items: center;
+	justify-content: stretch;
+	align-items: stretch;
 	z-index: 10;
 }
 #source-sidebar {
@@ -1357,13 +1357,7 @@ a.test-arrow:hover {
 	text-align: center;
 	border: none;
 	outline: none;
-	position: absolute;
-	top: 0;
-	bottom: 0;
-	left: 0;
-	right: 0;
-	/* work around button layout strangeness: https://stackoverflow.com/q/7271561 */
-	width: 100%;
+	flex: 1 1;
 	/* iOS button gradient: https://stackoverflow.com/q/5438567 */
 	-webkit-appearance: none;
 	opacity: 1;