Skip to content

Commit 5dccb4e

Browse files
committed
rustdoc: CSS: show the <details> "triangle" in all cases
Currently we use `<details>` and `<summary>` for the unstable info box, under class `.stab`. However, they can also be useful to add detailed documentation like lengthy detailed examples that would be too much to show by default, e.g.: /// <details><summary>Time-threads diagram</summary> /// /// ```text /// // Thread 1 | // Thread 2 /// let _rg = lock.read(); | /// | // will block /// | let _wg = lock.write(); /// // may deadlock | /// let _rg = lock.read(); | /// ``` /// </details> See rust-lang#82624 for an example where we could use this functionality. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 4f20caa commit 5dccb4e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustdoc/html/static/rustdoc.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ p {
148148
}
149149

150150
summary {
151+
display: list-item;
151152
outline: none;
152153
}
153154

@@ -834,10 +835,6 @@ body.blur > :not(#help) {
834835
display: inline;
835836
}
836837

837-
.stab summary {
838-
display: list-item;
839-
}
840-
841838
.stab .emoji {
842839
font-size: 1.5em;
843840
}

0 commit comments

Comments
 (0)