diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index e2e1aefa4a8..f11ca52dab1 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -1262,12 +1262,11 @@ h4 > .notable-traits {
}
#copy-path {
+ background: initial;
margin-left: 10px;
padding: 0;
padding-left: 2px;
-}
-#copy-path> img {
- margin-bottom: 2px;
+ border: 0;
}
#theme-choices {
diff --git a/src/librustdoc/html/static/themes/ayu.css b/src/librustdoc/html/static/themes/ayu.css
index 13d1a475e4b..6651260c28f 100644
--- a/src/librustdoc/html/static/themes/ayu.css
+++ b/src/librustdoc/html/static/themes/ayu.css
@@ -502,20 +502,29 @@ kbd {
box-shadow-color: #c6cbd1;
}
-#theme-picker, #settings-menu, #help-button, #copy-path {
+#theme-picker, #settings-menu, #help-button {
border-color: #5c6773;
background-color: #0f1419;
color: #fff;
}
-#theme-picker > img, #settings-menu > img, #copy-path > img {
+#theme-picker > img, #settings-menu > img {
filter: invert(100);
}
+#copy-path {
+ color: #fff;
+}
+#copy-path > img {
+ filter: invert(70%);
+}
+#copy-path:hover > img {
+ filter: invert(100%);
+}
+
#theme-picker:hover, #theme-picker:focus,
#settings-menu:hover, #settings-menu:focus,
-#help-button:hover, #help-button:focus,
-#copy-path:hover, #copy-path:focus {
+#help-button:hover, #help-button:focus {
border-color: #e0e0e0;
}
diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css
index 945ca9b252e..548306d99eb 100644
--- a/src/librustdoc/html/static/themes/dark.css
+++ b/src/librustdoc/html/static/themes/dark.css
@@ -392,7 +392,7 @@ kbd {
box-shadow-color: #c6cbd1;
}
-#theme-picker, #settings-menu, #help-button, #copy-path {
+#theme-picker, #settings-menu, #help-button {
border-color: #e0e0e0;
background: #f0f0f0;
color: #000;
@@ -400,11 +400,20 @@ kbd {
#theme-picker:hover, #theme-picker:focus,
#settings-menu:hover, #settings-menu:focus,
-#help-button:hover, #help-button:focus,
-#copy-path:hover, #copy-path:focus {
+#help-button:hover, #help-button:focus {
border-color: #ffb900;
}
+#copy-path {
+ color: #999;
+}
+#copy-path > img {
+ filter: invert(50%);
+}
+#copy-path:hover > img {
+ filter: invert(65%);
+}
+
#theme-choices {
border-color: #e0e0e0;
background-color: #353535;
diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css
index 2ed638bdd4f..76e880256fd 100644
--- a/src/librustdoc/html/static/themes/light.css
+++ b/src/librustdoc/html/static/themes/light.css
@@ -384,18 +384,27 @@ kbd {
box-shadow-color: #c6cbd1;
}
-#theme-picker, #settings-menu, #help-button, #copy-path {
+#theme-picker, #settings-menu, #help-button {
border-color: #e0e0e0;
background-color: #fff;
}
#theme-picker:hover, #theme-picker:focus,
#settings-menu:hover, #settings-menu:focus,
-#help-button:hover, #help-button:focus,
-#copy-path:hover, #copy-path:focus {
+#help-button:hover, #help-button:focus {
border-color: #717171;
}
+#copy-path {
+ color: #999;
+}
+#copy-path > img {
+ filter: invert(50%);
+}
+#copy-path:hover > img {
+ filter: invert(35%);
+}
+
#theme-choices {
border-color: #ccc;
background-color: #fff;