diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-04 06:40:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-04 06:40:34 +0100 |
| commit | f35dccbc724272565e6cca86bc73d16dae1c1f52 (patch) | |
| tree | 4cc3be19b5b28ca2544464560b63149aee3d5977 | |
| parent | 9ef3b414a593e2343df516a842910ce982926e4b (diff) | |
| parent | f097940da8f282b6503c5f37fd449652de285578 (diff) | |
| download | rust-f35dccbc724272565e6cca86bc73d16dae1c1f52.tar.gz rust-f35dccbc724272565e6cca86bc73d16dae1c1f52.zip | |
Rollup merge of #103938 - notriddle:notriddle/search-results-border-bottom, r=GuillaumeGomez
rustdoc: clean up hardcoded CSS border color on search results Hardcoded colors in rustdoc.css should usually be avoided. Preview: http://notriddle.com/notriddle-rustdoc-demos/border-bottom-search/test_dingus/?search=test
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 3 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/search-result-color.goml | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 772e057ddb0..01f2c14b98d 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -894,7 +894,7 @@ so that we can apply CSS-filters to change the arrow color in themes */ /* 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 #aaa3; + border-bottom: 1px solid var(--border-color); } .search-results > a > div { @@ -1874,7 +1874,6 @@ in storage.js /* Display an alternating layout on tablets and phones */ .search-results > a { - border-bottom: 1px solid #aaa9; padding: 5px 0px; } .search-results .result-name, .search-results div.desc { diff --git a/src/test/rustdoc-gui/search-result-color.goml b/src/test/rustdoc-gui/search-result-color.goml index 69bb30df954..37d7b03a099 100644 --- a/src/test/rustdoc-gui/search-result-color.goml +++ b/src/test/rustdoc-gui/search-result-color.goml @@ -75,6 +75,12 @@ assert-css: ( {"color": "rgb(0, 150, 207)"}, ) +// Checking the color of the bottom border. +assert-css: ( + ".search-results > a", + {"border-bottom-color": "rgb(92, 103, 115)"} +) + // Checking the color of "keyword" text. assert-css: ( "//*[@class='result-name']//*[text()='(keyword)']", @@ -181,6 +187,12 @@ assert-css: ( {"color": "rgb(221, 221, 221)"}, ) +// Checking the color of the bottom border. +assert-css: ( + ".search-results > a", + {"border-bottom-color": "rgb(224, 224, 224)"} +) + // Checking the color for "keyword" text. assert-css: ( "//*[@class='result-name']//*[text()='(keyword)']", @@ -272,6 +284,12 @@ assert-css: ( {"color": "rgb(0, 0, 0)"}, ) +// Checking the color of the bottom border. +assert-css: ( + ".search-results > a", + {"border-bottom-color": "rgb(224, 224, 224)"} +) + // Checking the color for "keyword" text. assert-css: ( "//*[@class='result-name']//*[text()='(keyword)']", |
