Skip to content

Commit 5ba2950

Browse files
committed
make the icons smaller + fix the alignment
1 parent fdf6e61 commit 5ba2950

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ button#toggle-all-docs {
308308
height: 17px;
309309
vertical-align: middle;
310310

311-
background: url('data:image/svg+xml,<svg width="17" height="17" viewBox="0 0 17 17" \
312-
fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.32143 8L8.5 12.5L12.6786 8H15L8.5 15L2 8H4.32143Z" \
313-
fill="gray"/><path d="M8.5 11L2 4L15 4L8.5 11Z" fill="gray"/></svg>') no-repeat top left;
311+
background: url('data:image/svg+xml,<svg width="17" height="17" viewBox="0 0 17 17" fill="none" \
312+
xmlns="http://www.w3.org/2000/svg"><path d="M4.32143 7L8.5 11.5L12.6786 7H15L8.5 14L2 7H4.32143Z" \
313+
fill="gray"/><path d="M8.5 10L2 3L15 3L8.5 10Z" fill="gray"/></svg>') no-repeat top left;
314314
}
315315
button#toggle-all-docs:hover,
316316
button#toggle-all-docs:focus {
@@ -1467,8 +1467,9 @@ details.toggle > summary.hideme > span {
14671467

14681468
details.toggle > summary::before {
14691469
/* toggle plus */
1470-
background: url('data:image/svg+xml,<svg width="17" height="17" fill="gray" stroke="gray" \
1471-
xmlns="http://www.w3.org/2000/svg"><path d="M13 8.5L4 14L4 3L13 8.5Z"/></svg>') no-repeat top left;
1470+
background: url('data:image/svg+xml,<svg width="17" height="17" fill="gray" \
1471+
xmlns="http://www.w3.org/2000/svg"><path d="M13.75 9.5L5.25 14.5L5.25 4.5L13.75 9.5Z"/> \
1472+
</svg>') no-repeat top left;
14721473
content: "";
14731474
cursor: pointer;
14741475
width: 16px;
@@ -1524,7 +1525,7 @@ details.toggle > summary.hideme::before {
15241525
details.toggle > summary:not(.hideme)::before {
15251526
position: absolute;
15261527
left: -24px;
1527-
top: 4px;
1528+
top: 3px;
15281529
}
15291530

15301531
.impl-items > details.toggle > summary:not(.hideme)::before {
@@ -1547,14 +1548,20 @@ details.toggle[open] > summary.hideme > span {
15471548

15481549
details.toggle[open] > summary::before {
15491550
/* toggle minus */
1550-
background: url('data:image/svg+xml,<svg width="17" height="17" fill="gray" stroke="gray" \
1551-
xmlns="http://www.w3.org/2000/svg"><path d="M8.5 13L3 4L14 4L8.5 13Z"/></svg>') no-repeat top left;
1551+
background: url('data:image/svg+xml,<svg width="17" height="17" fill="gray" \
1552+
xmlns="http://www.w3.org/2000/svg"><path d="M9.5 13.75L4.5 5.25L14.5 5.25L9.5 13.75Z"/> \
1553+
</svg>') no-repeat top left;
15521554
}
15531555

15541556
details.toggle[open] > summary::after {
15551557
content: "Collapse";
15561558
}
15571559

1560+
details.toggle.type-contents-toggle > summary::before,
1561+
details.toggle.top-doc > summary::before {
1562+
margin-bottom: 5px;
1563+
}
1564+
15581565
/* This is needed in docblocks to have the "▶" element to be on the same line. */
15591566
.docblock summary > * {
15601567
display: inline-block;

0 commit comments

Comments
 (0)