Skip to content

Commit 6601e20

Browse files
Rollup merge of #104250 - GuillaumeGomez:migrate-not-found-link-color, r=notriddle
Migrate no result page link color to CSS variables r? ``@notriddle``
2 parents 55ae651 + ee73812 commit 6601e20

File tree

4 files changed

+36
-13
lines changed

4 files changed

+36
-13
lines changed

src/librustdoc/html/static/css/themes/ayu.css

-4
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ details.rustdoc-toggle > summary::before {
160160
color: #788797;
161161
}
162162

163-
.search-failed a {
164-
color: #39AFD7;
165-
}
166-
167163
.tooltip::after {
168164
background-color: #314559;
169165
color: #c5c5c5;

src/librustdoc/html/static/css/themes/dark.css

-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ details.rustdoc-toggle > summary::before {
8282
filter: invert(100%);
8383
}
8484

85-
.search-failed a {
86-
color: #0089ff;
87-
}
88-
8985
.tooltip::after {
9086
background-color: #000;
9187
color: #fff;

src/librustdoc/html/static/css/themes/light.css

-5
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,12 @@
6969
--crate-search-hover-border: #717171;
7070
}
7171

72-
7372
.content .item-info::before { color: #ccc; }
7473

7574
body.source .example-wrap pre.rust a {
7675
background: #eee;
7776
}
7877

79-
.search-failed a {
80-
color: #3873AD;
81-
}
82-
8378
.tooltip::after {
8479
background-color: #000;
8580
color: #fff;
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// The goal of this test is to check the color of the "no result" links.
2+
goto: "file://" + |DOC_PATH| + "/lib2/index.html?search=sdkfskjfsdks"
3+
show-text: true
4+
5+
define-function: (
6+
"check-no-result",
7+
(theme, link, link_hover),
8+
[
9+
// Changing theme.
10+
("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
11+
("reload"),
12+
("wait-for", "#results"),
13+
("assert", ".search-failed.active"),
14+
("assert-css", ("#results a", {"color": |link|}, ALL)),
15+
("move-cursor-to", "#results a"),
16+
("assert-css", ("#results a:hover", {"color": |link_hover|})),
17+
// Moving the cursor to some other place to not create issues with next function run.
18+
("move-cursor-to", ".search-input"),
19+
]
20+
)
21+
22+
call-function: ("check-no-result", {
23+
"theme": "ayu",
24+
"link": "rgb(57, 175, 215)",
25+
"link_hover": "rgb(57, 175, 215)",
26+
})
27+
call-function: ("check-no-result", {
28+
"theme": "dark",
29+
"link": "rgb(210, 153, 29)",
30+
"link_hover": "rgb(210, 153, 29)",
31+
})
32+
call-function: ("check-no-result", {
33+
"theme": "light",
34+
"link": "rgb(56, 115, 173)",
35+
"link_hover": "rgb(56, 115, 173)",
36+
})

0 commit comments

Comments
 (0)