From ba5f05b1c4cd3a3db4f1f526a911cf76f815c6a2 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 20 Sep 2022 12:07:35 -0700 Subject: [PATCH 1/2] rustdoc: remove unnecessary `max-width` on headers This code was added in 003b2bc1c65251ec2fc80b78ed91c43fb35402ec to prevent these headers from overlapping `.out-of-band` side items. That stopped being a problem when 3f92ff34b5a2fe8dd1a32aa27d437519e63782f0 switched rustdoc over to using `float`, rather than `position: absolute`, to implement this. --- src/librustdoc/html/static/css/rustdoc.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index e985e6c43ade9..c2875f126078d 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -674,7 +674,6 @@ h2.location a { } .method > .code-header, .trait-impl > .code-header { - max-width: calc(100% - 41px); display: block; } From f528d49c23c8d1f50152cbbebe0f1920136fa956 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 21 Sep 2022 17:29:47 -0700 Subject: [PATCH 2/2] rustdoc: update test case for headers without max-width --- src/test/rustdoc-gui/notable-trait.goml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/rustdoc-gui/notable-trait.goml b/src/test/rustdoc-gui/notable-trait.goml index 69088a0774fc4..7eb00d825a5c3 100644 --- a/src/test/rustdoc-gui/notable-trait.goml +++ b/src/test/rustdoc-gui/notable-trait.goml @@ -83,7 +83,7 @@ assert-position: ( ) // Checking on very small mobile. The `i` should be on its own line. -size: (410, 600) +size: (365, 600) compare-elements-position-false: ( "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']", "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",