Skip to content

Commit f5b3b40

Browse files
Inline clipboard.svg into CSS
1 parent ce609db commit f5b3b40

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/librustdoc/html/static/css/rustdoc.css

+11-1
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,17 @@ a.tooltip:hover::after {
16361636
}
16371637
#copy-path::before {
16381638
filter: var(--copy-path-img-filter);
1639-
content: url('clipboard-24048e6d87f63d07.svg');
1639+
/* clipboard <https://github.com/rust-lang/crates.io/commits/main/public/assets/copy.svg> */
1640+
content: url('data:image/svg+xml,<svg width="19" height="18" viewBox="0 0 24 25" \
1641+
xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard">\
1642+
<path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 \
1643+
0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 \
1644+
7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 \
1645+
2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/>\
1646+
<path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/>\
1647+
</svg>');
1648+
width: 19px;
1649+
height: 18px;
16401650
}
16411651
#copy-path:hover::before {
16421652
filter: var(--copy-path-img-hover-filter);

src/librustdoc/html/static/images/clipboard.svg

-1
This file was deleted.

src/librustdoc/html/static_files.rs

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ static_files! {
100100
storage_js => "static/js/storage.js",
101101
scrape_examples_js => "static/js/scrape-examples.js",
102102
wheel_svg => "static/images/wheel.svg",
103-
clipboard_svg => "static/images/clipboard.svg",
104103
copyright => "static/COPYRIGHT.txt",
105104
license_apache => "static/LICENSE-APACHE.txt",
106105
license_mit => "static/LICENSE-MIT.txt",

0 commit comments

Comments
 (0)