diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-18 08:37:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-18 08:37:48 +0200 |
| commit | 56f4ac308b28f747db4ed680de69167a651e6fba (patch) | |
| tree | 8a57a83eaa8eecbc117443720daa28130f97820e /src/librustdoc/html/static/css/rustdoc.css | |
| parent | 5260893724057f707fd993dc3a7a050f3fc7be9e (diff) | |
| parent | 1ebc9efa786c3312b5c8b5659aeffc048ccd6f3b (diff) | |
| download | rust-56f4ac308b28f747db4ed680de69167a651e6fba.tar.gz rust-56f4ac308b28f747db4ed680de69167a651e6fba.zip | |
Rollup merge of #124041 - GuillaumeGomez:fix-copy-path-button, r=notriddle
Fix copy path button Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in https://github.com/rust-lang/rust/pull/123706 forgot to update the JS (it contained an image before but not anymore). I had to make some small changes in the CSS to fix the display when the button was clicked as well. r? ``@notriddle``
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index e9c687b42fa..74c9130fd77 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1627,24 +1627,27 @@ a.tooltip:hover::after { color: var(--copy-path-button-color); background: var(--main-background-color); height: 34px; + width: 33px; margin-left: 10px; padding: 0; padding-left: 2px; border: 0; - width: 33px; - line-height: 0; font-size: 0; } - -#copy-path:before { +#copy-path::before { filter: var(--copy-path-img-filter); content: url('clipboard-24048e6d87f63d07.svg'); - width: 19px; - height: 18px; } -#copy-path:hover:before { +#copy-path:hover::before { filter: var(--copy-path-img-hover-filter); } +#copy-path.clicked::before { + /* Checkmark <https://www.svgrepo.com/svg/335033/checkmark> */ + content: url('data:image/svg+xml,<svg viewBox="-1 -1 23 23" xmlns="http://www.w3.org/2000/svg" \ + fill="black" height="18px">\ + <g><path d="M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"></path>\ + </g></svg>'); +} @keyframes rotating { from { |
