diff options
| author | Michael Howell <michael@notriddle.com> | 2021-07-17 10:55:33 -0700 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-08-03 14:35:38 +0200 |
| commit | 59460a655643b32fe2e1ac39279333bf5a574a82 (patch) | |
| tree | 74b7db6d7193369715c00246da997f25c0f89cb6 /src/librustdoc/html/static/css/rustdoc.css | |
| parent | c58246efe47bea09d4f3e70f536e4c9bb7770749 (diff) | |
| download | rust-59460a655643b32fe2e1ac39279333bf5a574a82.tar.gz rust-59460a655643b32fe2e1ac39279333bf5a574a82.zip | |
Pull the "Expand" / "Collapse" text to the end of the line, instead of start
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index ae321be09e2..531484f2105 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -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; +} + +/* 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::before { +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"; } |
