From 1fe3ce476c0c36485b90d0bd5dc8cb27f57be1c6 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 26 Sep 2022 09:20:20 -0700 Subject: [PATCH 1/2] rustdoc: remove unneeded CSS `td, th { padding 0 }` This was added in 510107815fe888319028c5e96001cdee70e7a931, to fix the display of the module items and search results tables (see the discussion in https://github.com/rust-lang/rust/pull/86725). Those aren't tables any more. The only remaining table is in docblock, which has its own padding declarations. --- src/librustdoc/html/static/css/rustdoc.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 28dc4bf30108e..5257ab600c50a 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -299,11 +299,6 @@ summary { /* Fix some style changes due to normalize.css 8 */ -td, -th { - padding: 0; -} - table { border-collapse: collapse; } From 99904445b8d8e37f27ae7ababd5f3fb48b0d8813 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 26 Sep 2022 09:54:44 -0700 Subject: [PATCH 2/2] rustdoc: merge `table { border-collapse } into `.docblock table` This was added in 510107815fe888319028c5e96001cdee70e7a931, to fix the display of the module items and search results tables (see the discussion in https://github.com/rust-lang/rust/pull/86725). Those aren't tables any more. The only remaining table is in docblock, which needs this attribute to look right. --- src/librustdoc/html/static/css/rustdoc.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 5257ab600c50a..679aea411d192 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -299,10 +299,6 @@ summary { /* Fix some style changes due to normalize.css 8 */ -table { - border-collapse: collapse; -} - button, input, optgroup, @@ -690,6 +686,7 @@ pre, .rustdoc.source .example-wrap { width: calc(100% - 2px); overflow-x: auto; display: block; + border-collapse: collapse; } .docblock table td {