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: clean up hardcoded CSS border color on search results #103938

Merged
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
3 changes: 1 addition & 2 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -1875,7 +1875,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 {
Expand Down
18 changes: 18 additions & 0 deletions src/test/rustdoc-gui/search-result-color.goml
Original file line number Diff line number Diff line change
Expand Up @@ -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)']",
Expand Down Expand Up @@ -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)']",
Expand Down Expand Up @@ -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)']",
Expand Down