From 0b22d4170eddc179680c0da4415fab721e02f85a Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Mon, 7 Feb 2022 22:36:51 -0800 Subject: rustdoc: fix spacing of non-toggled impl blocks We recently removed the "up here" arrows on item-infos, and adjusted vertical spacing so that even without the arrow, it would be visually clear which item the item-info belonged to. The new CSS styles for vertical spacing only applied to toggles, though. This missed non-toggled impl blocks - for instance, those without any methods, like https://doc.rust-lang.org/nightly/std/marker/trait.Send.html#implementors. The result was lists of implementors that were spaced too closely. This PR fixes the spacing by making it apply to non-toggled impl blocks as well. This also fixes an issue where item-infos were displayed too far below their items. That was a result of display: table on .item-info .stab. Changed that to display: inline-block. --- src/librustdoc/html/static/css/rustdoc.css | 5 +++-- 1 file changed, 3 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 04112c9779b..18b424663b2 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1041,7 +1041,7 @@ body.blur > :not(#help) { } .item-info .stab { - display: table; + display: inline-block; } .stab { padding: 3px; @@ -2039,7 +2039,8 @@ details.rustdoc-toggle[open] > summary.hideme::after { } .method-toggle summary, -.implementors-toggle summary { +.implementors-toggle summary, +.impl { margin-bottom: 0.75em; } -- cgit 1.4.1-3-g733a5