diff options
| author | Michael Howell <michael@notriddle.com> | 2022-10-30 19:31:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-30 19:31:37 -0700 |
| commit | 8d6ed3edec11dab0c0f71cb528dda54510cddf2e (patch) | |
| tree | 774d4060001ef55a8377dbfc9b73e4ef5c817c0d /src/librustdoc/html/static/css/rustdoc.css | |
| parent | 7e62406e013ddc363b15707d5434d5e45f1163a5 (diff) | |
| parent | bdbc9772c61cc2941caafe97139203b5821f38e2 (diff) | |
| download | rust-8d6ed3edec11dab0c0f71cb528dda54510cddf2e.tar.gz rust-8d6ed3edec11dab0c0f71cb528dda54510cddf2e.zip | |
Rollup merge of #101944 - notriddle:notriddle/toggle-all-docs, r=jsha,GuillaumeGomez
rustdoc: clean up `#toggle-all-docs` This change converts the element from an `<a>` link to a button. It's pretty much directly trading slightly more CSS for slightly less HTML, and it's also semantically correct (so you don't get a broken "bookmark" option when you right click on it). While doing this, I also got rid of the unnecessary `class="inner"` attribute on the inner span. There was a style targeting `.collapse-toggle > .inner`, but no CSS ever targeted the `#toggle-all-docs > .inner`. Preview: https://notriddle.com/notriddle-rustdoc-test/button-toggle-all-docs/index.html
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 118c6779cb1..894499e5c4f 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -163,9 +163,6 @@ h1.fqn { padding-bottom: 6px; margin-bottom: 15px; } -#toggle-all-docs { - text-decoration: none; -} /* The only headings that get underlines are: Markdown-generated headings within the top-doc Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc) @@ -209,7 +206,7 @@ ul.all-items { font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif; } -a#toggle-all-docs, +#toggle-all-docs, a.anchor, .small-section-header a, #source-sidebar a, @@ -299,6 +296,16 @@ button { padding: 1px 6px; } +button#toggle-all-docs { + padding: 0; + background: none; + border: none; + cursor: pointer; + /* iOS button gradient: https://stackoverflow.com/q/5438567 */ + -webkit-appearance: none; + opacity: 1; +} + /* end tweaks for normalize.css 8 */ .rustdoc { |
