Skip to content

Commit b0e41f1

Browse files
committed
Auto merge of #51482 - GuillaumeGomez:table-display, r=QuietMisdreavus
Greatly improve tables display in docs Fixes #51454. r? @QuietMisdreavus Before: <img width="1440" alt="screen shot 2018-06-10 at 22 43 52" src="https://user-images.githubusercontent.com/3050060/41206138-cc61b2b4-6cff-11e8-9b6f-0b1e435d4b1b.png"> After: <img width="1440" alt="screen shot 2018-06-10 at 23 33 16" src="https://user-images.githubusercontent.com/3050060/41207049-d455c03c-6d0e-11e8-968f-d4fccaeb4265.png">
2 parents cbc4c83 + de97464 commit b0e41f1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/librustdoc/html/static/rustdoc.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,31 +407,27 @@ h4 > code, h3 > code, .invisible > code {
407407

408408
.content table:not(.table-display) {
409409
border-spacing: 0 5px;
410-
border-collapse: separate;
411410
}
412411
.content td { vertical-align: top; }
413412
.content td:first-child { padding-right: 20px; }
414413
.content td p:first-child { margin-top: 0; }
415414
.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
415+
.content tr:first-child td { border-top: 0; }
416416

417417
.docblock table {
418-
border: 1px solid;
419418
margin: .5em 0;
420-
border-collapse: collapse;
421419
width: 100%;
422420
}
423421

424422
.docblock table td {
425423
padding: .5em;
426-
border-top: 1px dashed;
427-
border-bottom: 1px dashed;
424+
border: 1px dashed;
428425
}
429426

430427
.docblock table th {
431428
padding: .5em;
432429
text-align: left;
433-
border-top: 1px solid;
434-
border-bottom: 1px solid;
430+
border: 1px solid;
435431
}
436432

437433
.fields + table {

0 commit comments

Comments
 (0)