From a65c98fefb78cddee955b87214732b0de30a769f Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Thu, 21 Oct 2021 23:09:11 -0700 Subject: Remove underlines from non-top docblocks. We still had a number of places where underlined section headings would show up, like under Implementations. --- src/librustdoc/html/static/css/rustdoc.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/librustdoc/html/static/css/rustdoc.css') diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index b98dae85ba0..93cbc0debb9 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -134,7 +134,7 @@ h1, h2, h3, h4 { margin: 20px 0 15px 0; padding-bottom: 6px; } -h5, h6 { +.docblock h3, .docblock h4, h5, h6 { margin: 15px 0 5px 0; } h1.fqn { @@ -149,7 +149,14 @@ h1.fqn { h1.fqn > .in-band > a:hover { text-decoration: underline; } -h2, h3, h4 { +/* The only headings that get underlines are: + Markdown-generated headings within the top-doc + Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc) + Underlines elsewhere in the documentation break up visual flow and tend to invert + section hierarchies. */ +h2, +.top-doc h3, +.top-doc h4 { border-bottom: 1px solid; } h3.code-header { -- cgit 1.4.1-3-g733a5