diff options
| author | Michael Howell <michael@notriddle.com> | 2023-02-07 19:00:18 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-02-07 19:00:42 -0700 |
| commit | 894c98652c91a5ff824e81d847760c518857d0a2 (patch) | |
| tree | 7276f8deb767d89c9f01539512d3d822c1e90a51 /src/librustdoc/html/static/css | |
| parent | 3f059f60467419823e2a63d6d20f414829040f2f (diff) | |
| download | rust-894c98652c91a5ff824e81d847760c518857d0a2.tar.gz rust-894c98652c91a5ff824e81d847760c518857d0a2.zip | |
rustdoc: simplify DOM for `.item-table`
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
Diffstat (limited to 'src/librustdoc/html/static/css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 2a9548712f0..ce7bd95fde3 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -193,7 +193,7 @@ h1, h2, h3, h4, h5, h6, .mobile-topbar, .search-input, .search-results .result-name, -.item-left > a, +.item-name > a, .out-of-band, span.since, a.srclink, @@ -742,14 +742,16 @@ table, .item-table { display: table; + padding: 0; + margin: 0; } -.item-row { +.item-table > li { display: table-row; } -.item-left, .item-right { +.item-table > li > div { display: table-cell; } -.item-left { +.item-table > li > .item-name { padding-right: 1.25rem; } @@ -954,7 +956,7 @@ so that we can apply CSS-filters to change the arrow color in themes */ padding: 3px; margin-bottom: 5px; } -.item-left .stab { +.item-name .stab { margin-left: 0.3125em; } .stab { @@ -1723,7 +1725,7 @@ in storage.js } /* Display an alternating layout on tablets and phones */ - .item-table, .item-row, .item-left, .item-right, + .item-table, .item-row, .item-table > li, .item-table > li > div, .search-results > a, .search-results > a > div { display: block; } @@ -1732,7 +1734,7 @@ in storage.js .search-results > a { padding: 5px 0px; } - .search-results > a > div.desc, .item-right { + .search-results > a > div.desc, .item-table > li > div.desc { padding-left: 2em; } |
