Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: remove incorrect CSS selector .impl-items table td #101046

Merged
merged 1 commit into from
Aug 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ pre, .rustdoc.source .example-wrap {
.content .docblock >.impl-items table td {
padding: 0;
}
.content .docblock > .impl-items .table-display, .impl-items table td {
.content .docblock > .impl-items .table-display {
border: none;
}

Expand Down
4 changes: 4 additions & 0 deletions src/test/rustdoc-gui/docblock-table.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
goto: file://|DOC_PATH|/test_docs/doc_block_table/struct.DocBlockTable.html#method.func

compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])
26 changes: 26 additions & 0 deletions src/test/rustdoc-gui/src/test_docs/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,29 @@ pub mod details {
/// </details>
pub struct Details;
}

pub mod doc_block_table {

pub trait DocBlockTableTrait {
fn func();
}

/// Struct doc.
///
/// | header1 | header2 |
/// |--------------------------|--------------------------|
/// | Lorem Ipsum, Lorem Ipsum | Lorem Ipsum, Lorem Ipsum |
pub struct DocBlockTable {}

impl DocBlockTableTrait for DocBlockTable {
/// Trait impl func doc for struct.
///
/// | header1 | header2 |
/// |--------------------------|--------------------------|
/// | Lorem Ipsum, Lorem Ipsum | Lorem Ipsum, Lorem Ipsum |
fn func() {
println!();
}
}

}