Skip to content

Commit 3e9d7ec

Browse files
committed
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`
2 parents e8cb1a4 + 14413ad commit 3e9d7ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/librustdoc/html/static/rustdoc.css

+6-4
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ summary {
200200
outline: none;
201201
}
202202

203+
/* FIXME: Remove after normalize.css is either upgraded or removed (#86629) */
204+
details:not(.rustdoc-toggle) summary {
205+
margin-bottom: .6em;
206+
display: list-item;
207+
}
208+
203209
code, pre, a.test-arrow {
204210
font-family: "Source Code Pro", monospace;
205211
}
@@ -897,10 +903,6 @@ body.blur > :not(#help) {
897903
display: inline;
898904
}
899905

900-
.stab summary {
901-
display: list-item;
902-
}
903-
904906
.stab .emoji {
905907
font-size: 1.5em;
906908
}

0 commit comments

Comments
 (0)