diff --git a/src/librustdoc/html/static/themes/ayu.css b/src/librustdoc/html/static/themes/ayu.css
index 13d1a475e4b2a..16f40ec14d5ea 100644
--- a/src/librustdoc/html/static/themes/ayu.css
+++ b/src/librustdoc/html/static/themes/ayu.css
@@ -248,8 +248,8 @@ details.undocumented > summary::before {
box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent;
}
-.search-focus:disabled {
- color: #929292;
+.search-input:disabled {
+ background-color: #3e3e3e;
}
.module-item .stab,
diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css
index 945ca9b252e5f..fe05a462e81e9 100644
--- a/src/librustdoc/html/static/themes/dark.css
+++ b/src/librustdoc/html/static/themes/dark.css
@@ -209,7 +209,7 @@ details.undocumented > summary::before {
border-color: #008dfd;
}
-.search-focus:disabled {
+.search-input:disabled {
background-color: #c5c4c4;
}
diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css
index 2ed638bdd4fa1..2253fac1c09d1 100644
--- a/src/librustdoc/html/static/themes/light.css
+++ b/src/librustdoc/html/static/themes/light.css
@@ -207,7 +207,7 @@ details.undocumented > summary::before {
border-color: #66afe9;
}
-.search-focus:disabled {
+.search-input:disabled {
background-color: #e6e6e6;
}