diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 4ec8637cc71f6..787f3c7f48004 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -424,7 +424,8 @@ h4 > code, h3 > code, .invisible > code {
.docblock table {
margin: .5em 0;
- width: 100%;
+ width: calc(100% - 2px);
+ border: 1px dashed;
}
.docblock table td {
@@ -657,7 +658,7 @@ a {
transition: border-color 300ms ease;
transition: border-radius 300ms ease-in-out;
transition: box-shadow 300ms ease-in-out;
- width: 100%;
+ width: calc(100% - 32px);
}
#crate-search + .search-input {
diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css
index b5200fa36df9e..e756ab60ccc6d 100644
--- a/src/librustdoc/html/static/themes/dark.css
+++ b/src/librustdoc/html/static/themes/dark.css
@@ -68,20 +68,10 @@ pre {
border-bottom-color: #DDD;
}
-.docblock table {
+.docblock table, .docblock table td, .docblock table th {
border-color: #ddd;
}
-.docblock table td {
- border-top-color: #ddd;
- border-bottom-color: #ddd;
-}
-
-.docblock table th {
- border-top-color: #ddd;
- border-bottom-color: #ddd;
-}
-
.content .method .where,
.content .fn .where,
.content .where.fmt-newline {
diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css
index e712a7d18a9da..a294f6f2ff123 100644
--- a/src/librustdoc/html/static/themes/light.css
+++ b/src/librustdoc/html/static/themes/light.css
@@ -67,21 +67,11 @@ pre {
}
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
- border-bottom-color: #DDD;
-}
-
-.docblock table {
- border-color: #ddd;
-}
-
-.docblock table td {
- border-top-color: #ddd;
border-bottom-color: #ddd;
}
-.docblock table th {
- border-top-color: #ddd;
- border-bottom-color: #ddd;
+.docblock table, .docblock table td, .docblock table th {
+ border-color: #ddd;
}
.content .method .where,