diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-02 06:52:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-02 06:52:15 +0100 |
| commit | 75ea3a9948b77c3ef2471545b9c818ab1a724dcd (patch) | |
| tree | 8cc5d4de4653ed992252862f63cc0b9a1c6ec0c1 /src/librustdoc/html/static/css | |
| parent | 150b9d753bea74a0b76d9bcd971ac323ede1d14a (diff) | |
| parent | 63f82db9584d72fa042641ed4ef970cfe701356d (diff) | |
| download | rust-75ea3a9948b77c3ef2471545b9c818ab1a724dcd.tar.gz rust-75ea3a9948b77c3ef2471545b9c818ab1a724dcd.zip | |
Rollup merge of #107531 - GuillaumeGomez:inline-images-in-css, r=notriddle
Inline CSS background images directly into the CSS A nice advantage of this is that it removes a few entries in the list of static files. r? ``@notriddle``
Diffstat (limited to 'src/librustdoc/html/static/css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index dad27c66a3d..ee988090ca3 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -814,8 +814,11 @@ so that we can apply CSS-filters to change the arrow color in themes */ background-repeat: no-repeat; background-size: 20px; background-position: calc(100% - 2px) 56%; - /* image is black color */ - background-image: url("down-arrow-927217e04c7463ac.svg"); + /* down arrow (image is black color) */ + background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \ + width="128" height="128" viewBox="-30 -20 176 176"><path d="M111,40.5L64,87.499L17,40.5" \ + fill="none" stroke="black" strike-linecap="square" stroke-miterlimit="10" stroke-width="12"/> \ + </svg>'); /* changes the arrow image color */ filter: var(--crate-search-div-filter); } @@ -1444,7 +1447,10 @@ details.toggle > summary.hideme > span { } details.toggle > summary::before { - background: url("toggle-plus-1092eb4930d581b0.svg") no-repeat top left; + /* toggle plus */ + background: url('data:image/svg+xml,<svg width="17" height="17" \ +shape-rendering="crispEdges" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg"><path \ +d="M5 2.5H2.5v12H5m7-12h2.5v12H12M5 8.5h7M8.5 12V8.625v0V5"/></svg>') no-repeat top left; content: ""; cursor: pointer; width: 16px; @@ -1522,7 +1528,10 @@ details.toggle[open] > summary.hideme > span { } details.toggle[open] > summary::before { - background: url("toggle-minus-31bbd6e4c77f5c96.svg") no-repeat top left; + /* toggle minus */ + background: url('data:image/svg+xml,<svg width="17" height="17" \ +shape-rendering="crispEdges" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg"><path \ +d="M5 2.5H2.5v12H5m7-12h2.5v12H12M5 8.5h7"/></svg>') no-repeat top left; } details.toggle[open] > summary::after { |
