diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-10-20 04:35:17 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 04:35:17 +0900 |
| commit | 570b999c967ee414ed2ba3b87d87469cd910695b (patch) | |
| tree | f545fe54d9f498c73a25847a6d30de9a9f786e2b | |
| parent | d8b3764bd2ae7054dc6896fbd414d95ccb9da2a0 (diff) | |
| parent | e39934374a6e27fa446fc2dcb4ea45050059c5a8 (diff) | |
| download | rust-570b999c967ee414ed2ba3b87d87469cd910695b.tar.gz rust-570b999c967ee414ed2ba3b87d87469cd910695b.zip | |
Rollup merge of #90036 - jsha:less-rule, r=GuillaumeGomez
Remove border-bottom from most docblocks. Headings in the top-doc docblock still get a border-bottom due to a rule that covers all h2, h3, and h4. Method docblocks are generally h5, and so don't get a border-bottom anymore. This fixes a problem where a sub-sub-heading within a method would have a line that went all the way across the page, creating a division that made that sub-sub-heading look much more important than it really is. Fixes #90033 Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html r? ``@GuillaumeGomez``
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 72946b2021f..e41c993a528 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -129,9 +129,14 @@ h3 { } h1, h2, h3, h4, h5, h6 { font-weight: 500; +} +h1, h2, h3, h4 { margin: 20px 0 15px 0; padding-bottom: 6px; } +h5, h6 { + margin: 15px 0 5px 0; +} h1.fqn { display: flex; border-bottom: 1px dashed; @@ -505,14 +510,12 @@ nav.sub { white-space: pre-wrap; } -.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5, .docblock h6 { - border-bottom: 1px solid; -} - .top-doc .docblock h2 { font-size: 1.3em; } .top-doc .docblock h3 { font-size: 1.15em; } .top-doc .docblock h4, -.top-doc .docblock h5, +.top-doc .docblock h5 { + font-size: 1.1em; +} .top-doc .docblock h6 { font-size: 1em; } |
