Skip to content

Commit 6557985

Browse files
Improve display of <details> in doc blocks
1 parent bef2b7c commit 6557985

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/librustdoc/html/static/css/rustdoc.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ h1.fqn {
158158
Underlines elsewhere in the documentation break up visual flow and tend to invert
159159
section hierarchies. */
160160
h2,
161-
.top-doc h3,
162-
.top-doc h4 {
161+
.top-doc .docblock > h3,
162+
.top-doc .docblock > h4 {
163163
border-bottom: 1px solid;
164164
}
165165
h3.code-header {
@@ -1669,6 +1669,18 @@ details.rustdoc-toggle[open] > summary.hideme::after {
16691669
content: "Collapse";
16701670
}
16711671

1672+
.docblock details summary {
1673+
display: flex;
1674+
list-style: none;
1675+
align-items: center;
1676+
}
1677+
.docblock details[open] summary::before {
1678+
content: "► ";
1679+
}
1680+
.docblock details[open] summary::before {
1681+
content: "▼ ";
1682+
}
1683+
16721684
/* Media Queries */
16731685

16741686
@media (min-width: 701px) {

0 commit comments

Comments
 (0)