diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css
index 849924ea5501e..8dd7b2b3edc40 100644
--- a/src/librustdoc/html/static/css/themes/ayu.css
+++ b/src/librustdoc/html/static/css/themes/ayu.css
@@ -37,7 +37,7 @@ h4 {
.docblock code {
color: #ffb454;
}
-h3 > code, h4 > code, h5 > code {
+.code-header {
color: #e6e1cf;
}
pre > code {