Rollup merge of #91223 - GuillaumeGomez:headings-indent, r=jsha

Fix headings indent

Fixes #91200.

Screenshots with the fix:

![Screenshot from 2021-11-25 15-32-35](https://user-images.githubusercontent.com/3050060/143462481-f7e9ea13-72d5-46fe-90e0-9527e74599e3.png)
![Screenshot from 2021-11-25 15-32-49](https://user-images.githubusercontent.com/3050060/143462485-c010716a-0276-421b-a777-afff19c81c96.png)

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`
This commit is contained in:
Matthias Krüger 2021-11-26 22:41:40 +01:00 committed by GitHub
commit 330a558e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 5 deletions

View file

@ -1129,13 +1129,15 @@ h3.variant {
margin-top: 3px;
}
.docblock > .section-header:first-child {
.top-doc .docblock > .section-header:first-child {
margin-left: 15px;
margin-top: 0;
}
.top-doc .docblock > .section-header:first-child:hover > a:before {
left: -10px;
}
.docblock > .section-header:first-child:hover > a:before {
left: -10px;
.docblock > .section-header:first-child {
margin-top: 0;
}
:target > code, :target > .code-header {