about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-09-20 10:13:02 -0700
committerGitHub <noreply@github.com>2022-09-20 10:13:02 -0700
commit128733d742eb5a2a4e7579c1e9e28cb5774ff661 (patch)
treef4b118a97411b6630cb1de4283e937f88d409897
parent1b54ee38a315270bfacc46a1498d198a13e2c76e (diff)
parent17259c3995fd66b15955b1bd0ce135173d528320 (diff)
downloadrust-128733d742eb5a2a4e7579c1e9e28cb5774ff661.tar.gz
rust-128733d742eb5a2a4e7579c1e9e28cb5774ff661.zip
Rollup merge of #102034 - notriddle:notriddle/border-bottom, r=GuillaumeGomez
rustdoc: remove no-op CSS `h1-6 { border-bottom-color }`

For this rule to have an actual effect, the border-bottom width needs specified, elsewhere, without also specifying the color. This doesn't happen. Ever since 88b137d5fe0cbe28dab4f9af61045c726f831872, every spot where headers get a border assigned to them also assigns the color.

Preview: https://notriddle.com/notriddle-rustdoc-test/border-bottom/rustc_monomorphize/collector/index.html
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css7
-rw-r--r--src/test/rustdoc-gui/docblock-details.goml2
-rw-r--r--src/test/rustdoc-gui/headings.goml24
3 files changed, 13 insertions, 20 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 72918570fb8..e985e6c43ad 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -141,10 +141,6 @@ h1, h2, h3, h4 {
 h1.fqn {
 	margin: 0;
 	padding: 0;
-	border-bottom-color: var(--headings-border-bottom-color);
-}
-h2, h3, h4 {
-	border-bottom-color: var(--headings-border-bottom-color);
 }
 .main-heading {
 	display: flex;
@@ -659,9 +655,6 @@ h2.location a {
 
 .docblock h5 { font-size: 1rem; }
 .docblock h6 { font-size: 0.875rem; }
-.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5, .docblock h6 {
-	border-bottom-color: var(--headings-border-bottom-color);
-}
 
 .docblock {
 	margin-left: 24px;
diff --git a/src/test/rustdoc-gui/docblock-details.goml b/src/test/rustdoc-gui/docblock-details.goml
index f6287ade2f2..c0c4d1b43aa 100644
--- a/src/test/rustdoc-gui/docblock-details.goml
+++ b/src/test/rustdoc-gui/docblock-details.goml
@@ -14,7 +14,7 @@ assert-css: (
 // We now check that the `<summary>` doesn't have a bottom border and has the correct display.
 assert-css: (
     ".top-doc .docblock summary h4",
-    {"border-bottom": "0px none rgb(210, 210, 210)"},
+    {"border-bottom-width": "0px"},
 )
 // This allows to ensure that summary is on one line only!
 assert-property: (".top-doc .docblock summary h4", {"offsetHeight": "33"})
diff --git a/src/test/rustdoc-gui/headings.goml b/src/test/rustdoc-gui/headings.goml
index ed07e777b18..53308e13480 100644
--- a/src/test/rustdoc-gui/headings.goml
+++ b/src/test/rustdoc-gui/headings.goml
@@ -168,19 +168,19 @@ assert-css: (
 )
 assert-css: (
     ".top-doc .docblock h5",
-    {"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
+    {"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h4",
-    {"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
+    {"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h5",
-    {"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
+    {"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h6",
-    {"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
+    {"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
 )
 
 local-storage: {"rustdoc-theme": "dark"}
@@ -199,19 +199,19 @@ assert-css: (
 )
 assert-css: (
     ".top-doc .docblock h5",
-    {"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
+    {"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h4",
-    {"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
+    {"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h5",
-    {"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
+    {"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h6",
-    {"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
+    {"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
 )
 
 local-storage: {"rustdoc-theme": "ayu"}
@@ -230,19 +230,19 @@ assert-css: (
 )
 assert-css: (
     ".top-doc .docblock h5",
-    {"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
+    {"color": "rgb(197, 197, 197)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h4",
-    {"color": "rgb(255, 255, 255)", "border-bottom": "0px none rgb(92, 103, 115)"},
+    {"color": "rgb(255, 255, 255)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h5",
-    {"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
+    {"color": "rgb(197, 197, 197)", "border-bottom-width": "0px"},
 )
 assert-css: (
     "#implementations-list .docblock h6",
-    {"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
+    {"color": "rgb(197, 197, 197)", "border-bottom-width": "0px"},
 )
 
 local-storage: {"rustdoc-theme": "light"}