Commit a09e8c5
committed
rustdoc: clean up docblock table CSS
* The rule `display: block` had no noticeable effect. Technically, because
markdown tables have a tbody and thead, they get wrapped in an [anonymous
table box] in the CSS tree, nested within the `<table>` element's block
layout box.
This rule was added in rust-lang#87230 to make the table side-scrolling, but
this same issue was doubly fixed in rust-lang#88742 by wrapping it in an explicit
`<div>` tag. Since accessibility advocates recommend the wrapper div over
marking the table as `display: block`, we'll stick with that.
https://adrianroselli.com/2020/11/under-engineered-responsive-tables.html
* The rule `width: calc(100% - 2px)` had no visible effect, because the
anonymous table box was not affected.
* The style is tweaked to basically be the same style GitHub uses.
In particular, it adds zebra stripes, and removes dotted borders.
[anonymous table box]: https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes1 parent b28d30e commit a09e8c5
File tree
4 files changed
+7
-10
lines changed- src/librustdoc/html/static/css
- themes
4 files changed
+7
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | 634 | | |
638 | 635 | | |
639 | 636 | | |
640 | | - | |
| 637 | + | |
641 | 638 | | |
642 | | - | |
643 | | - | |
| 639 | + | |
644 | 640 | | |
645 | 641 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
| 642 | + | |
| 643 | + | |
650 | 644 | | |
651 | 645 | | |
652 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
0 commit comments