diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 2a9548712f086..3f7030ef841e1 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -297,12 +297,28 @@ button { button#toggle-all-docs { padding: 0; - background: none; + margin-bottom: 2px; border: none; + outline: none; /* iOS button gradient: https://stackoverflow.com/q/5438567 */ -webkit-appearance: none; + opacity: 0.5; + cursor: pointer; + width: 17px; + height: 17px; + vertical-align: middle; + + background: url('data:image/svg+xml,') no-repeat top left; +} +button#toggle-all-docs:hover, +button#toggle-all-docs:focus { opacity: 1; } +button#toggle-all-docs.will-expand { + transform: rotate(180deg); +} .rustdoc { display: flex; @@ -1451,9 +1467,9 @@ details.toggle > summary.hideme > span { details.toggle > summary::before { /* toggle plus */ - background: url('data:image/svg+xml,') no-repeat top left; + background: url('data:image/svg+xml, \ +') no-repeat top left; content: ""; cursor: pointer; width: 16px; @@ -1509,7 +1525,7 @@ details.toggle > summary.hideme::before { details.toggle > summary:not(.hideme)::before { position: absolute; left: -24px; - top: 4px; + top: 3px; } .impl-items > details.toggle > summary:not(.hideme)::before { @@ -1532,15 +1548,20 @@ details.toggle[open] > summary.hideme > span { details.toggle[open] > summary::before { /* toggle minus */ - background: url('data:image/svg+xml,') no-repeat top left; + background: url('data:image/svg+xml, \ +') no-repeat top left; } details.toggle[open] > summary::after { content: "Collapse"; } +details.toggle.type-contents-toggle > summary::before, +details.toggle.top-doc > summary::before { + margin-bottom: 5px; +} + /* This is needed in docblocks to have the "▶" element to be on the same line. */ .docblock summary > * { display: inline-block; diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html index 3a1867b7feba3..6b9903f472eee 100644 --- a/src/librustdoc/html/templates/print_item.html +++ b/src/librustdoc/html/templates/print_item.html @@ -22,7 +22,6 @@

{#- -#} {%- else -%} {%- endmatch -%} {#- -#} {#- -#} {#- -#}