diff options
| author | Ralf Jung <post@ralfj.de> | 2021-05-18 19:35:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 19:35:45 +0200 |
| commit | 6e05a71bf7acc08155bac8b4c495eee8dc5c8201 (patch) | |
| tree | 51ffc551749dcadd1afce1e60ce5590a206d8df3 | |
| parent | 27bc2b39c740dc3a61a104e9fdb0b9bd47d43fc1 (diff) | |
| parent | 5d004c1e2020eaa9bc336f09b6b0475c0eef4d78 (diff) | |
| download | rust-6e05a71bf7acc08155bac8b4c495eee8dc5c8201.tar.gz rust-6e05a71bf7acc08155bac8b4c495eee8dc5c8201.zip | |
Rollup merge of #85407 - GuillaumeGomez:copy-path-display-improvement, r=jsha
Improve display for "copy-path" button, making it more discreet As suggested by `@Nemo157` [here](https://github.com/rust-lang/rust/pull/85118#issuecomment-838887670):       r? `@jsha`
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/static/themes/ayu.css | 17 | ||||
| -rw-r--r-- | src/librustdoc/html/static/themes/dark.css | 15 | ||||
| -rw-r--r-- | src/librustdoc/html/static/themes/light.css | 15 |
4 files changed, 39 insertions, 13 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index c7bf01d148a..28fa867b95f 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1268,12 +1268,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 066f27232e4..989ea7140c5 100644 --- a/src/librustdoc/html/static/themes/ayu.css +++ b/src/librustdoc/html/static/themes/ayu.css @@ -516,20 +516,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 814a7e827e8..e6bd16ddd11 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -396,7 +396,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; @@ -404,11 +404,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 fdbf1ab15c5..5481b348aa2 100644 --- a/src/librustdoc/html/static/themes/light.css +++ b/src/librustdoc/html/static/themes/light.css @@ -388,18 +388,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; |
