diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-20 01:09:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-20 01:09:38 +0100 |
| commit | c0695bbf6083fae739c259c8d88ef24502e5c089 (patch) | |
| tree | ea551cea48448daa6f5361a11a6d0547c4126fe1 /src/librustdoc/html/static | |
| parent | 97bd45b3730c8f09327b6f8ca5133de38269101c (diff) | |
| parent | 69df43b041f76251391f11264c1ff763ca2a64a0 (diff) | |
| download | rust-c0695bbf6083fae739c259c8d88ef24502e5c089.tar.gz rust-c0695bbf6083fae739c259c8d88ef24502e5c089.zip | |
Rollup merge of #90089 - jsha:enum-fields-headings, r=camelid,GuillaumeGomez
Improve display of enum variants Use h3 and h4 for the variant name and the "Fields" subheading. Remove the "of T" part of the "Fields" subheading. Remove border-bottom from "Fields" subheading. Move docblock below "Fields" listing. Fixes #90061 Demo: https://jacob.hoffman-andrews.com/rust/xmlparser-updated/xmlparser/enum.Token.html#variants https://jacob.hoffman-andrews.com/rust/fix-enum-variants/std/io/enum.ErrorKind.html#variants https://jacob.hoffman-andrews.com/rust/fix-enum-variants/std/result/enum.Result.html#variants r? ``@camelid``
Diffstat (limited to 'src/librustdoc/html/static')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 89a763ef6d7..cb1df15bbb1 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1102,25 +1102,28 @@ a.test-arrow:hover{ margin-right: 5px; } -.sub-variant, .sub-variant > h3 { - margin-top: 0px !important; - padding-top: 1px; +h3.variant { + font-weight: 600; + font-size: 1.1em; + margin-bottom: 10px; + border-bottom: none; } -#main .sub-variant > h3 { - font-size: 15px; - margin-left: 25px; - margin-bottom: 5px; +.sub-variant h4 { + font-size: 1em; + font-weight: 400; + border-bottom: none; + margin-top: 0; + margin-bottom: 0; } -.sub-variant > div { - margin-left: 20px; - margin-bottom: 10px; +.sub-variant { + margin-left: 24px; + margin-bottom: 40px; } -.sub-variant > div > span { - display: block; - position: relative; +.sub-variant > .sub-variant-field { + margin-left: 24px; } .toggle-label { |
