diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-26 22:41:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-26 22:41:40 +0100 |
| commit | 330a558e42abb0fbfc020079754de299aaa409f2 (patch) | |
| tree | fed5a6701c7574e7e1f6da796cd9190d6360db9f /src/librustdoc/html/static/css | |
| parent | fcbbdaf2092ad2dee5763389ad89f89cbf560906 (diff) | |
| parent | 23427567b2030dfe1a8e99cd86d2602517118035 (diff) | |
| download | rust-330a558e42abb0fbfc020079754de299aaa409f2.tar.gz rust-330a558e42abb0fbfc020079754de299aaa409f2.zip | |
Rollup merge of #91223 - GuillaumeGomez:headings-indent, r=jsha
Fix headings indent Fixes #91200. Screenshots with the fix:   If the first element of a top docblock is a heading, we still need to keep the indent, but only on this one (I added a test to check it). We need it because otherwise the anchor will go over the `[-]` toggle. cc `@camelid` r? `@jsha`
Diffstat (limited to 'src/librustdoc/html/static/css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index bfad5106951..479b5210f9e 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1129,15 +1129,17 @@ h3.variant { margin-top: 3px; } -.docblock > .section-header:first-child { +.top-doc .docblock > .section-header:first-child { margin-left: 15px; - margin-top: 0; } - -.docblock > .section-header:first-child:hover > a:before { +.top-doc .docblock > .section-header:first-child:hover > a:before { left: -10px; } +.docblock > .section-header:first-child { + margin-top: 0; +} + :target > code, :target > .code-header { opacity: 1; } |
