diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 022ed606cc3b8..1bca973bf7171 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1287,6 +1287,7 @@ a.test-arrow:hover {
#titles > button > div.count {
display: inline-block;
font-size: 1rem;
+ color: var(--search-tab-title-count-color);
}
#src-sidebar-toggle {
diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css
index de0dfcd469045..1355ae9c2bacd 100644
--- a/src/librustdoc/html/static/css/themes/ayu.css
+++ b/src/librustdoc/html/static/css/themes/ayu.css
@@ -45,6 +45,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--search-color: #fff;
--search-results-alias-color: #c5c5c5;
--search-results-grey-color: #999;
+ --search-tab-title-count-color: #888;
--stab-background-color: #314559;
--stab-code-color: #e6e1cf;
--code-highlight-kw-color: #ff7733;
@@ -175,10 +176,6 @@ pre, .rustdoc.source .example-wrap {
border-bottom: 1px solid rgba(242, 151, 24, 0.3);
}
-#titles > button > div.count {
- color: #888;
-}
-
/* rules that this theme does not need to set, here to satisfy the rule checker */
/* note that a lot of these are partially set in some way (meaning they are set
individually rather than as a group) */
diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css
index dd7fc6892537c..84449542f22bf 100644
--- a/src/librustdoc/html/static/css/themes/dark.css
+++ b/src/librustdoc/html/static/css/themes/dark.css
@@ -40,6 +40,7 @@
--search-color: #111;
--search-results-alias-color: #fff;
--search-results-grey-color: #ccc;
+ --search-tab-title-count-color: #888;
--stab-background-color: #314559;
--stab-code-color: #e6e1cf;
--code-highlight-kw-color: #ab8ac1;
@@ -96,10 +97,6 @@
background-color: #353535;
}
-#titles > button > div.count {
- color: #888;
-}
-
.scraped-example-list .scrape-help {
border-color: #aaa;
color: #eee;
diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css
index b69d8a1cff957..68dc0ce539b05 100644
--- a/src/librustdoc/html/static/css/themes/light.css
+++ b/src/librustdoc/html/static/css/themes/light.css
@@ -40,6 +40,7 @@
--search-color: #000;
--search-results-alias-color: #000;
--search-results-grey-color: #999;
+ --search-tab-title-count-color: #888;
--stab-background-color: #fff5d6;
--stab-code-color: #000;
--code-highlight-kw-color: #8959a8;
@@ -93,10 +94,6 @@
border-top-color: #0089ff;
}
-#titles > button > div.count {
- color: #888;
-}
-
.scraped-example-list .scrape-help {
border-color: #555;
color: #333;
diff --git a/src/test/rustdoc-gui/search-result-color.goml b/src/test/rustdoc-gui/search-result-color.goml
index dde43b1c980af..d124045608c12 100644
--- a/src/test/rustdoc-gui/search-result-color.goml
+++ b/src/test/rustdoc-gui/search-result-color.goml
@@ -66,6 +66,11 @@ reload:
// Waiting for the search results to appear...
wait-for: "#titles"
+assert-css: (
+ "#titles > button > div.count",
+ {"color": "rgb(136, 136, 136)"},
+ ALL,
+)
assert-css: (
"//*[@class='desc'][text()='Just a normal struct.']",
{"color": "rgb(197, 197, 197)"},
@@ -178,6 +183,11 @@ reload:
// Waiting for the search results to appear...
wait-for: "#titles"
+assert-css: (
+ "#titles > button > div.count",
+ {"color": "rgb(136, 136, 136)"},
+ ALL,
+)
assert-css: (
"//*[@class='desc'][text()='Just a normal struct.']",
{"color": "rgb(221, 221, 221)"},
@@ -275,6 +285,11 @@ reload:
// Waiting for the search results to appear...
wait-for: "#titles"
+assert-css: (
+ "#titles > button > div.count",
+ {"color": "rgb(136, 136, 136)"},
+ ALL,
+)
assert-css: (
"//*[@class='desc'][text()='Just a normal struct.']",
{"color": "rgb(0, 0, 0)"},