forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit a2fc275
authored
Rollup merge of rust-lang#105442 - notriddle:notriddle/docblock-table-css, r=GuillaumeGomez
rustdoc: clean up docblock table CSS
# Preview
http://notriddle.com/notriddle-rustdoc-demos/table-2/test_dingus/fn.test.html
# Before

# After

# Details
* 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.
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Markdown.20table.20styling
[anonymous table box]: https://www.w3.org/TR/CSS2/tables.html#anonymous-boxesFile tree
0 file changed
+0
-0
lines changedFilter options
0 file changed
+0
-0
lines changed
0 commit comments