Skip to content

Commit

Permalink
Update rustdoc.css
Browse files Browse the repository at this point in the history
Update rustdoc.css

Update rustdoc.css

Update rustdoc.css

Update rustdoc.css

Update rustdoc.css

Update rustdoc.css

Update type-declation-overflow.goml

fix test

make into flex
  • Loading branch information
BradMarr authored and GuillaumeGomez committed Jul 6, 2024
1 parent 67f0d43 commit 587dff9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -904,12 +904,14 @@ table,
}

.item-table {
display: table;
display: flex;
flex-direction: column;
padding: 0;
margin: 0;
}
.item-table > li {
display: table-row;
display: flex;
justify-content: space-between;
}
.item-table > li > div {
display: table-cell;
Expand Down Expand Up @@ -2127,6 +2129,9 @@ in src-script.js and main.js
padding: 2px 4px;
box-shadow: 0 0 4px var(--main-background-color);
}
.item-table > li > .item-name {
max-width: 50%;
}
}

@media print {
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-gui/type-declation-overflow.goml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ assert-property: ("pre.item-decl", {"scrollWidth": "1324"})

// In the table-ish view on the module index, the name should not be wrapped more than necessary.
go-to: "file://" + |DOC_PATH| + "/lib2/too_long/index.html"
assert-property: (".item-table .struct", {"offsetWidth": "684"})
assert-property: (".item-table .struct", {"offsetWidth": "392"})

// We now make the same check on type declaration...
go-to: "file://" + |DOC_PATH| + "/lib2/too_long/type.ReallyLongTypeNameLongLongLong.html"
Expand Down

0 comments on commit 587dff9

Please sign in to comment.