forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#135641 - GuillaumeGomez:items-list, r=notriddle [rustdoc] Replace module list items `ul`/`li` with `dl`/`dd`/`dt` elements `@hywan` suggested that rustdoc should use `dl`,`dt` and `dd` HTML tags for listing items on module pages as it matches better what this is (an item and optionally its description). This is a very good idea so here is the implementation. Also nice side-effect of this change: it reduces a bit the generated HTML since we go from: This PR shouldn't impact page appearance. ```html <ul class="item-table"> <li> <div class="item-name">NAME</div> <div class="desc docblock-short">THE DOC</div> </li> </ul> ``` to: ```html <dl class="item-table"> <dt>NAME</dt> <dd>THE DOC</dd> </dl> ``` You can test it [here](https://rustdoc.crud.net/imperio/items-list/std/index.html). r? `@notriddle`
- Loading branch information
Showing
47 changed files
with
185 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// This test ensures that <table> elements aren't display in items summary. | ||
go-to: "file://" + |DOC_PATH| + "/lib2/summary_table/index.html" | ||
// We check that we picked the right item first. | ||
assert-text: (".item-table .item-name", "Foo") | ||
assert-text: (".item-table dt", "Foo") | ||
// Then we check that its summary is empty. | ||
assert-false: ".item-table .desc" | ||
assert-false: ".item-table dd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.