diff options
| author | Michael Howell <michael@notriddle.com> | 2024-04-09 17:15:33 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2024-04-09 19:35:23 -0700 |
| commit | 13235dce5d0af794e48150e99329fc90faaa1f01 (patch) | |
| tree | 3195cbdf15325e921d25e3252ad2e70b2e0576e9 /src/librustdoc/html/static/css/rustdoc.css | |
| parent | dac788f0a1488f52503b016f214710c390b08d0e (diff) | |
| download | rust-13235dce5d0af794e48150e99329fc90faaa1f01.tar.gz rust-13235dce5d0af794e48150e99329fc90faaa1f01.zip | |
rustdoc: load icons from css instead of inline
This cuts the HTML overhead for a page by about 1KiB, significantly reducing the overall size of the docs bundle.
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 0bb073b1cea..e9c687b42fa 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1603,6 +1603,16 @@ a.tooltip:hover::after { border-color: var(--settings-button-border-focus); } +#settings-menu > a { + line-height: 0; + font-size: 0; +} +#settings-menu > a:before { + content: url('wheel-63255fc4502dca9a.svg'); + width: 22px; + height: 22px; +} + #sidebar-button > a:before { content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" \ fill="none" stroke="black">\ @@ -1622,11 +1632,17 @@ a.tooltip:hover::after { padding-left: 2px; border: 0; width: 33px; + line-height: 0; + font-size: 0; } -#copy-path > img { + +#copy-path:before { filter: var(--copy-path-img-filter); + content: url('clipboard-24048e6d87f63d07.svg'); + width: 19px; + height: 18px; } -#copy-path:hover > img { +#copy-path:hover:before { filter: var(--copy-path-img-hover-filter); } |
