Skip to content

Commit b53305d

Browse files
Fix tables display
1 parent 618f5a0 commit b53305d

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

src/librustdoc/html/static/rustdoc.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ h4 > code, h3 > code, .invisible > code {
424424

425425
.docblock table {
426426
margin: .5em 0;
427-
width: 100%;
427+
width: calc(100% - 2px);
428+
border: 1px dashed;
428429
}
429430

430431
.docblock table td {
@@ -657,7 +658,7 @@ a {
657658
transition: border-color 300ms ease;
658659
transition: border-radius 300ms ease-in-out;
659660
transition: box-shadow 300ms ease-in-out;
660-
width: 100%;
661+
width: calc(100% - 32px);
661662
}
662663

663664
#crate-search + .search-input {

src/librustdoc/html/static/themes/dark.css

+1-11
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,10 @@ pre {
6868
border-bottom-color: #DDD;
6969
}
7070

71-
.docblock table {
71+
.docblock table, .docblock table td, .docblock table th {
7272
border-color: #ddd;
7373
}
7474

75-
.docblock table td {
76-
border-top-color: #ddd;
77-
border-bottom-color: #ddd;
78-
}
79-
80-
.docblock table th {
81-
border-top-color: #ddd;
82-
border-bottom-color: #ddd;
83-
}
84-
8575
.content .method .where,
8676
.content .fn .where,
8777
.content .where.fmt-newline {

src/librustdoc/html/static/themes/light.css

+2-12
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,11 @@ pre {
6767
}
6868

6969
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
70-
border-bottom-color: #DDD;
71-
}
72-
73-
.docblock table {
74-
border-color: #ddd;
75-
}
76-
77-
.docblock table td {
78-
border-top-color: #ddd;
7970
border-bottom-color: #ddd;
8071
}
8172

82-
.docblock table th {
83-
border-top-color: #ddd;
84-
border-bottom-color: #ddd;
73+
.docblock table, .docblock table td, .docblock table th {
74+
border-color: #ddd;
8575
}
8676

8777
.content .method .where,

0 commit comments

Comments
 (0)