about summary refs log tree commit diff
path: root/src/librustdoc/html/static
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-12-16 10:11:37 -0700
committerMichael Howell <michael@notriddle.com>2022-12-16 10:16:13 -0700
commitf309934b5ee074a74229546d859252dd7e946b2d (patch)
treee0bd074fe29936195d850cc325152ddf4c0a2e69 /src/librustdoc/html/static
parent03770f0e2b60c02db8fcf52fed5fb36aac70cedc (diff)
downloadrust-f309934b5ee074a74229546d859252dd7e946b2d.tar.gz
rust-f309934b5ee074a74229546d859252dd7e946b2d.zip
rustdoc: clean up margin CSS for scraped examples
* This stops applying a margin to the additional example links.
  Because these links are `display: inline`, it doesn't actually do anything.
* This switches from using a margin-bottom with a special exception for
  the examples themselves, plus an additional margin on the hide button,
  to instead using just margin-top on the examples, with an exception for
  the first one.

No user-visible changes should result from this.
Diffstat (limited to 'src/librustdoc/html/static')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index a527e9feaec..7b0e6439cfe 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -2009,7 +2009,6 @@ in storage.js
 
 .more-examples-toggle .hide-more {
 	margin-left: 25px;
-	margin-bottom: 5px;
 	cursor: pointer;
 }
 
@@ -2037,16 +2036,12 @@ in storage.js
 	height: 100%;
 }
 
-.more-scraped-examples .scraped-example {
-	margin-bottom: 20px;
-}
-
-.more-scraped-examples .scraped-example:last-child {
-	margin-bottom: 0;
+.more-scraped-examples .scraped-example, .example-links {
+	margin-top: 20px;
 }
 
-.example-links a {
-	margin-top: 20px;
+.more-scraped-examples .scraped-example:first-child {
+	margin-top: 5px;
 }
 
 .example-links ul {