diff options
| author | Michael Howell <michael@notriddle.com> | 2022-11-04 12:34:24 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-11-04 12:40:50 -0700 |
| commit | b30c4d1932f7c547a431d2a67f939a8305644fdc (patch) | |
| tree | 3ebe11ff360cfdb044d63c7860b98922df52182c /src/librustdoc/html/static/css/rustdoc.css | |
| parent | 6330c27ae24ec1556cf2b97eeac333dc23391686 (diff) | |
| download | rust-b30c4d1932f7c547a431d2a67f939a8305644fdc.tar.gz rust-b30c4d1932f7c547a431d2a67f939a8305644fdc.zip | |
rustdoc: simplify search results CSS and DOM
There is a layout change caused by this commit, but it's subtle. You won't notice it unless you're looking for it.
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 54f6e1ed4d5..227d9ac464b 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -889,23 +889,17 @@ so that we can apply CSS-filters to change the arrow color in themes */ } .search-results > a { - display: block; + display: flex; /* A little margin ensures the browser's outlining of focused links has room to display. */ margin-left: 2px; margin-right: 2px; border-bottom: 1px solid var(--border-color); + gap: 1em; } .search-results > a > div { - display: flex; - flex-flow: row wrap; -} - -.search-results .result-name, .search-results div.desc { - width: 50%; -} -.search-results .result-name { - padding-right: 1em; + flex: 1; + overflow: hidden; } .search-results a:hover, @@ -1867,7 +1861,8 @@ in storage.js } /* Display an alternating layout on tablets and phones */ - .item-table, .item-row, .item-left, .item-right { + .item-table, .item-row, .item-left, .item-right, + .search-results > a, .search-results > a > div { display: block; } @@ -1875,9 +1870,6 @@ in storage.js .search-results > a { padding: 5px 0px; } - .search-results .result-name, .search-results div.desc { - width: 100%; - } .search-results div.desc, .item-right { padding-left: 2em; } |
