about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-06-27 22:57:34 +0000
committerbors <bors@rust-lang.org>2021-06-27 22:57:34 +0000
commit3e9d7ecf784e5ecaf7437d04be3992ad23fa7cb6 (patch)
tree5377a52b46cfdfed4b29f5402af0adb4686940a2
parente8cb1a4a567ce88e459ffd431207eff2e0f0ffa5 (diff)
parent14413ad5394766107ed0bf10dd5197f9c9ce8085 (diff)
downloadrust-3e9d7ecf784e5ecaf7437d04be3992ad23fa7cb6.tar.gz
rust-3e9d7ecf784e5ecaf7437d04be3992ad23fa7cb6.zip
Auto merge of #86589 - JohnTitor:add-triangle-to-summary, r=jsha
Show triangle on the "Details" disclosure element in all cases

Re-submission of #82805, fixes the style issue by applying the same margin as `<p>`.

<details><summary>Before</summary>

![before 1](https://user-images.githubusercontent.com/25030997/123215032-e4c99880-d502-11eb-9ccc-6df58f3a6b0b.png)
![before 2](https://user-images.githubusercontent.com/25030997/123215035-e5622f00-d502-11eb-9275-6c6dfcfdf72e.png)
</details>

<details><summary>After</summary>

![after 1](https://user-images.githubusercontent.com/25030997/123215037-e5fac580-d502-11eb-9b49-c99d1eafb1b4.png)
![after 2](https://user-images.githubusercontent.com/25030997/123215040-e5fac580-d502-11eb-8afc-ab713d3dc658.png)
</details>

r? `@GuillaumeGomez`
-rw-r--r--src/librustdoc/html/static/rustdoc.css10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 3b52fd94d27..db200fe7913 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -200,6 +200,12 @@ summary {
 	outline: none;
 }
 
+/* FIXME: Remove after normalize.css is either upgraded or removed (#86629) */
+details:not(.rustdoc-toggle) summary {
+	margin-bottom: .6em;
+	display: list-item;
+}
+
 code, pre, a.test-arrow {
 	font-family: "Source Code Pro", monospace;
 }
@@ -897,10 +903,6 @@ body.blur > :not(#help) {
 	display: inline;
 }
 
-.stab summary {
-	display: list-item;
-}
-
 .stab .emoji {
 	font-size: 1.5em;
 }