Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove horizontal rule from Markdown-generated HTML #90033

Closed
jsha opened this issue Oct 18, 2021 · 0 comments · Fixed by #90036
Closed

remove horizontal rule from Markdown-generated HTML #90033

jsha opened this issue Oct 18, 2021 · 0 comments · Fixed by #90036
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Oct 18, 2021

When documentation has markdown headings (e.g. # Foo, ## Bar, etc), we currently display those with a horizontal rule (<hr>) across the whole page. However, that makes sub-sub-headings, like Panics in the below screenshot of https://docs.rs/rctree/0.4.0/rctree/struct.Node.html, look more prominent than their parents in the document structure. They also make the page look grouped along lines that it's not intended to be grouped along.

image

We should remove or hide these elements to improve the scannability of pages. Most likely we want to keep them when they are part of the docblock at the very top of the page, but hide them elsewhere.

@jsha jsha added the A-rustdoc-ui Area: Rustdoc UI (generated HTML) label Oct 18, 2021
@jyn514 jyn514 added A-async-await Area: Async & Await T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed A-async-await Area: Async & Await labels Oct 18, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Oct 19, 2021
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 rust-lang#90033

Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html

r? `@GuillaumeGomez`
@bors bors closed this as completed in 570b999 Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants