about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-08-31 18:07:40 -0600
committerGitHub <noreply@github.com>2017-08-31 18:07:40 -0600
commitfd5a945727b4c35dd15cd684e6d91fd0e9955034 (patch)
tree4e25818f75f3071e290625ace5c680724e7b6958
parent97b01abf3d222523d0db4f79c13ed45e7fef27e3 (diff)
parentbde0071d1db58bac0cb7c3b09f91410cd0c95d6e (diff)
downloadrust-fd5a945727b4c35dd15cd684e6d91fd0e9955034.tar.gz
rust-fd5a945727b4c35dd15cd684e6d91fd0e9955034.zip
Rollup merge of #44192 - GuillaumeGomez:sub-fields-style, r=QuietMisdreavus
Fix invalid display of enum sub-fields docs

Before:

<img width="1440" alt="screen shot 2017-08-30 at 23 17 00" src="https://user-images.githubusercontent.com/3050060/29895433-61f2bf8c-8dd9-11e7-83e8-cf1dca878100.png">

After:

<img width="1440" alt="screen shot 2017-08-30 at 23 16 48" src="https://user-images.githubusercontent.com/3050060/29895441-66dea042-8dd9-11e7-9576-11b0c770c70b.png">

cc @nox @rust-lang/docs
-rw-r--r--src/librustdoc/html/static/rustdoc.css14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 312dfce8d39..ca55d0e5d2a 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -658,11 +658,13 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
 
 .toggle-wrapper {
 	position: relative;
+	margin-top: 5px;
 }
 
 .toggle-wrapper.collapsed {
-	height: 1em;
+	height: 25px;
 	transition: height .2s;
+	margin-bottom: .6em;
 }
 
 .collapse-toggle > .inner {
@@ -704,14 +706,16 @@ span.since {
 	margin-top: 5px;
 }
 
-.variant + .toggle-wrapper > a {
-	margin-top: 5px;
-}
-
 .sub-variant, .sub-variant > h3 {
 	margin-top: 0 !important;
 }
 
+.toggle-label {
+	display: inline-block;
+	margin-left: 4px;
+	margin-top: 3px;
+}
+
 .enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
 	margin-left: 30px;
 	margin-bottom: 20px;