Skip to content

Commit

Permalink
rustdoc: make the toggle buttons look more like the big one
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Dec 6, 2023
1 parent b3c08a3 commit b1d9af3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1599,16 +1599,15 @@ details.toggle > summary.hideme > span {

details.toggle > summary::before {
/* toggle plus */
background: url('data:image/svg+xml,<svg width="19" height="19" stroke="black" fill="none" \
xmlns="http://www.w3.org/2000/svg"><path d="M2.5 2.5h14v14h-14v-14.5" \
shape-rendering="crispEdges" stroke="grey"/><path d="M6 9.5h7M9.5 13.5V5.5"/></svg>') no-repeat top left;
background: url('data:image/svg+xml,<svg width="15" height="15" stroke="black" fill="none" \
xmlns="http://www.w3.org/2000/svg"><path d="M3 6.5h7M6.5 10.5V2.5"/></svg>') no-repeat top left;
content: "";
cursor: pointer;
width: 18px;
height: 18px;
width: 13px;
height: 13px;
border: solid 1px #CCC;
display: inline-block;
vertical-align: middle;
opacity: .5;
filter: var(--toggle-filter);
}

Expand All @@ -1634,7 +1633,7 @@ details.toggle > summary.hideme::after {

details.toggle > summary:focus-visible::before,
details.toggle > summary:hover::before {
opacity: 1;
border-color: #666;
}

details.toggle > summary:focus-visible::before {
Expand Down Expand Up @@ -1680,9 +1679,9 @@ details.toggle[open] > summary.hideme > span {

details.toggle[open] > summary::before {
/* toggle minus */
background: url('data:image/svg+xml,<svg width="19" height="19" \
shape-rendering="crispEdges" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg"><path \
d="M2.5 2.5h14v14h-14v-14.5" stroke="grey"/><path d="M6 9.5h7"/></svg>') no-repeat top left;
background: url('data:image/svg+xml,<svg width="15" height="15" stroke="black" fill="none" \
xmlns="http://www.w3.org/2000/svg"><path d="M3 6.5h7"/></svg>') no-repeat top left;
<path d="M6 9.5h7"/></svg>') no-repeat top left;
}

details.toggle[open] > summary::after {
Expand Down

0 comments on commit b1d9af3

Please sign in to comment.