Skip to content

Commit 9cd140e

Browse files
authored
Rollup merge of #106035 - GuillaumeGomez:migrate-css-var-search-tab-title-color, r=notriddle
Migrate search tab title color to CSS variable r? ```@notriddle```
2 parents 4a5cece + faebd7a commit 9cd140e

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

src/librustdoc/html/static/css/rustdoc.css

+1
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,7 @@ a.test-arrow:hover {
12811281
#titles > button > div.count {
12821282
display: inline-block;
12831283
font-size: 1rem;
1284+
color: var(--search-tab-title-count-color);
12841285
}
12851286

12861287
#src-sidebar-toggle {

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
4545
--search-color: #fff;
4646
--search-results-alias-color: #c5c5c5;
4747
--search-results-grey-color: #999;
48+
--search-tab-title-count-color: #888;
4849
--stab-background-color: #314559;
4950
--stab-code-color: #e6e1cf;
5051
--code-highlight-kw-color: #ff7733;
@@ -175,10 +176,6 @@ pre, .rustdoc.source .example-wrap {
175176
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
176177
}
177178

178-
#titles > button > div.count {
179-
color: #888;
180-
}
181-
182179
/* rules that this theme does not need to set, here to satisfy the rule checker */
183180
/* note that a lot of these are partially set in some way (meaning they are set
184181
individually rather than as a group) */

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
--search-color: #111;
4141
--search-results-alias-color: #fff;
4242
--search-results-grey-color: #ccc;
43+
--search-tab-title-count-color: #888;
4344
--stab-background-color: #314559;
4445
--stab-code-color: #e6e1cf;
4546
--code-highlight-kw-color: #ab8ac1;
@@ -96,10 +97,6 @@
9697
background-color: #353535;
9798
}
9899

99-
#titles > button > div.count {
100-
color: #888;
101-
}
102-
103100
.scraped-example-list .scrape-help {
104101
border-color: #aaa;
105102
color: #eee;

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
--search-color: #000;
4141
--search-results-alias-color: #000;
4242
--search-results-grey-color: #999;
43+
--search-tab-title-count-color: #888;
4344
--stab-background-color: #fff5d6;
4445
--stab-code-color: #000;
4546
--code-highlight-kw-color: #8959a8;
@@ -93,10 +94,6 @@
9394
border-top-color: #0089ff;
9495
}
9596

96-
#titles > button > div.count {
97-
color: #888;
98-
}
99-
10097
.scraped-example-list .scrape-help {
10198
border-color: #555;
10299
color: #333;

src/test/rustdoc-gui/search-result-color.goml

+15
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ reload:
6666

6767
// Waiting for the search results to appear...
6868
wait-for: "#titles"
69+
assert-css: (
70+
"#titles > button > div.count",
71+
{"color": "rgb(136, 136, 136)"},
72+
ALL,
73+
)
6974
assert-css: (
7075
"//*[@class='desc'][text()='Just a normal struct.']",
7176
{"color": "rgb(197, 197, 197)"},
@@ -178,6 +183,11 @@ reload:
178183

179184
// Waiting for the search results to appear...
180185
wait-for: "#titles"
186+
assert-css: (
187+
"#titles > button > div.count",
188+
{"color": "rgb(136, 136, 136)"},
189+
ALL,
190+
)
181191
assert-css: (
182192
"//*[@class='desc'][text()='Just a normal struct.']",
183193
{"color": "rgb(221, 221, 221)"},
@@ -275,6 +285,11 @@ reload:
275285

276286
// Waiting for the search results to appear...
277287
wait-for: "#titles"
288+
assert-css: (
289+
"#titles > button > div.count",
290+
{"color": "rgb(136, 136, 136)"},
291+
ALL,
292+
)
278293
assert-css: (
279294
"//*[@class='desc'][text()='Just a normal struct.']",
280295
{"color": "rgb(0, 0, 0)"},

0 commit comments

Comments
 (0)