Pull the "Expand" / "Collapse" text to the end of the line, instead of start

This commit is contained in:
Michael Howell 2021-07-17 10:55:33 -07:00 committed by Guillaume Gomez
parent c58246efe4
commit 59460a6556

View file

@ -1508,10 +1508,7 @@ details.rustdoc-toggle > summary.hideme > span {
}
details.rustdoc-toggle > summary::before {
content: "Expand";
font-weight: 300;
font-size: 0.8em;
letter-spacing: 1px;
content: " ";
cursor: pointer;
width: 17px;
height: max(17px, 1.1em);
@ -1519,13 +1516,21 @@ details.rustdoc-toggle > summary::before {
display: inline-block;
vertical-align: middle;
opacity: .5;
text-indent: 17px;
overflow: hidden;
}
details.rustdoc-toggle > summary.hideme::before {
/* Screen readers see the text version at the end the line.
Visual readers see the icon at the start of the line, but small and transparent. */
details.rustdoc-toggle > summary::after {
content: "Expand";
overflow: hidden;
width: 0;
height: 0;
position: absolute;
}
details.rustdoc-toggle > summary.hideme::after {
/* "hideme" toggles already have a description when they're contracted */
content: " ";
content: "";
}
details.rustdoc-toggle > summary:focus::before {
@ -1588,6 +1593,11 @@ details.rustdoc-toggle[open] > summary.hideme::before {
height: max(17px, 1.1em);
background: data-url(minus-17x17.png) no-repeat top left;
display: inline-block;
content: " ";
}
details.rustdoc-toggle[open] > summary::after,
details.rustdoc-toggle[open] > summary.hideme::after {
content: "Collapse";
}