refactor(tree-wide): prefer simpler method for theming <img> elements (#820)

Co-authored-by: Gen <[email protected]>
This commit is contained in:
uncenterandGen authored and GitHub committed 2024-04-16 00:43:57 +01:00
1 parent 0ef96f1928
commit 1a1c19e26a
10 files changed
+29 -152

No files matched your search

+2 -13
View File
@@ -1362,11 +1362,7 @@
@svg: escape(
'<svg viewBox="0 0 525.333 92" xmlns="http://www.w3.org/2000/svg"><path fill="@{text}" d="M157.021 30.188h3.899l5.512-16.761a26.2 26.2 0 0 1 5.262 2.172q2.421 1.336 3.675 3.063 1.252 1.727 1.252 8.518v3.008h18.818q.95 2.225.95 4.732-.002 2.12-.78 2.84-.78.725-3.007.724H176.62v21.993q0 9.577 1.615 13.03 1.614 3.454 5.374 3.591 3.757.14 9.159-2.645 1.614 2.17 1.615 4.955-.001 3.79-3.982 5.096c-2.653.87-6.783 1.31-12.39 1.31q-9.186 0-13.112-3.678-3.925-3.673-3.924-14.253v-9.689q-.001-9.187-.557-19.71h-5.68q-1.002-2.394-1.003-4.843 0-1.893.753-2.673.75-.78 2.532-.78m44.755 2.727q-.001-2.001 1.475-2.617 1.476-.612 18.4-1.114.279 2.34 0 6.46 7.02-4.121 12.696-5.568c3.787-.963 7.127-1.45 10.024-1.45q2.006.001 2.672.475.668.474.668 2.2.001 3.06-.919 6.375c-.611 2.21-1.373 3.627-2.283 4.26q-1.363.946-4.315 1.392-2.951.447-3.424.223t-3.145-3.73q-4.12.001-6.321 2.978c-1.464 1.984-2.198 7.1-2.198 15.339q-.001 11.304.278 19.49h8.74q1.004 1.836 1.003 4.118 0 1.951-.805 2.729-.812.78-3.146.78h-28.397q-1.002-2.338-1.003-4.398 0-1.726.78-2.477.778-.753 2.506-.752h4.063q.278-8.187.278-18.988.001-15.59-1.475-18.43t-5.15-2.84q-1.001-2.225-1.002-4.455m74.318 44.712h6.57q.95 1.838.949 4.12 0 1.95-.81 2.73-.805.778-3.145.777h-26.726c-.633-1.558-.945-3.023-.945-4.398q0-1.726.777-2.478.78-.75 2.506-.751h4.566q.279-7.126.28-15.201-.001-12.304-.197-16.342-.195-4.036-.863-5.9-.668-1.867-2.06-2.34c-1.392-.474-2.282-.474-4.064-.474-.633-1.039-.945-2.246-.945-3.619q0-3.118 2.56-3.842 2.56-.723 10.413-.724 5.897-.001 8.045.446 2.142.446 2.45 1.755.305 1.307.306 3.646v27.394q.055 8.076.333 15.2m-10.189-55.68q-5.011.002-7.238-1.92t-2.228-5.428q.001-3.676 2.84-6.043 2.84-2.365 8.074-2.366 5.347 0 7.573 2.032t2.226 5.317q0 3.622-2.672 6.015t-8.575 2.392m43.083 13.643q6.07-3.787 11.664-5.372c3.732-1.06 6.857-1.589 9.384-1.589q7.85.001 11.663 3.455 3.816 3.451 3.815 13.918.001 27.396 1.001 29.54 1.004 2.141 4.343 2.088a10.7 10.7 0 0 1 .835 4.175c0 1.335-.436 2.248-1.308 2.726q-1.306.727-4.984.726-9.019.001-11.413-.28-2.393-.277-3.283-1.809-.893-1.529-.892-5.149V58.361q0-11.358-2.087-15.227-2.09-3.871-6.767-3.872-3.953.002-6.236 2.312t-2.283 9.66v11.193q0 7.016.278 15.201h6.626q.947 1.836.948 4.118 0 1.951-.808 2.73-.808.78-3.144.779h-26.227q-1.004-2.34-1.003-4.398 0-1.725.78-2.48.778-.75 2.505-.749h4.067a633 633 0 0 0 .275-18.99q0-15.588-1.475-18.43-1.475-2.838-5.15-2.837-1.003-2.228-1.002-4.455 0-2.004 1.476-2.618 1.474-.612 18.402-1.114.274 2.34 0 6.404m71.814 42.039h5.01q.95 1.838.949 4.12 0 1.95-.78 2.73-.784.778-3.175.777h-25.168q-.946-2.336-.946-4.398 0-1.726.78-2.478.78-.75 2.506-.751h4.566q.279-7.126.278-19.21-.002-25.278-.195-31.737-.194-6.458-.837-8.827-.64-2.364-2.171-3.06t-3.981-.697q-.946-2.284-.946-4.566-.001-2.337 1.726-2.98 1.725-.638 11.249-.638 5.899.001 8.045.472c1.43.318 2.253.9 2.478 1.754q.332 1.28.332 3.62v42.038q3.956-2.894 8.827-7.46c4.87-4.566 5.818-5.68 7.712-7.907h-4.12a9.3 9.3 0 0 1-.945-4.123q-.001-2.168.862-3.146.86-.971 2.755-.972h21.16q.945 1.891.945 4.007 0 2.454-.946 3.343-.948.89-3.286.89h-2.506l-14.922 13.863q6.459 9.969 11.164 15.87 4.704 5.904 6.904 7.683 2.197 1.782 5.206 1.783 1.057 3.842-.305 5.735-1.364 1.892-9.273 1.892-6.57.001-8.24-.918-1.669-.918-3.007-3.174c-1.338-2.256-2.162-3.822-3.812-6.96q-2.477-4.705-8.603-14.17l-5.57 5.288q0 5.181.28 12.307m72.981-49.055q11.584 0 16.816 5.264 5.234 5.26 5.233 16.619 0 5.625-2.227 8.017c-1.483 1.598-4.734 2.395-9.743 2.395h-20.713q.166 7.294 3.285 11.443 3.12 4.147 10.968 4.147c5.125 0 10.393-1.484 15.816-4.455q2.894 2.841 2.894 6.126 0 4.454-6.544 6.21-6.542 1.751-15.338 1.751-15.147.002-21.994-6.124-6.849-6.123-6.85-20.213 0-14.641 7.713-22.91 7.712-8.271 20.684-8.27m-2.225 9.633q-4.123 0-6.292 3.34c-1.45 2.229-2.19 6.107-2.23 11.638h2.953q6.18 0 9.438-.363c2.17-.239 3.442-.65 3.812-1.225q.559-.861.559-2.866-.001-5.01-2.17-7.767-2.175-2.756-6.07-2.757m34.395-8.017h3.899l5.512-16.761a26.2 26.2 0 0 1 5.262 2.172q2.422 1.336 3.675 3.063t1.254 8.518v3.008h18.817q.948 2.225.948 4.732 0 2.12-.78 2.84-.78.725-3.006.724h-15.979v21.993q-.001 9.577 1.612 13.03 1.614 3.454 5.375 3.591 3.756.14 9.158-2.645 1.617 2.17 1.615 4.955 0 3.79-3.981 5.096c-2.654.87-6.783 1.31-12.387 1.31q-9.19 0-13.113-3.678-3.926-3.673-3.926-14.253v-9.689q0-9.187-.558-19.71h-5.68q-1-2.394-1-4.843 0-1.893.75-2.673.754-.78 2.533-.78"/><path fill="@{green}" d="M138 46c0 25.405-20.596 46-46 46S46 71.405 46 46C46 20.596 66.594 0 92 0s46 20.596 46 46"/><path fill="@{blue}" d="M115.363 46c0 25.405-20.595 46-46 46s-46-20.595-46-46c0-25.404 20.595-46 46-46s46 20.596 46 46"/><path fill="@{yellow}" d="M92 46c0 25.405-20.596 46-46 46C20.595 92 0 71.405 0 46 0 20.596 20.595 0 46 0c25.404 0 46 20.596 46 46"/><path fill="@{base}" d="M28.218 73.993 56.52 45.172c4.106 3.774 10.488 3.639 14.426-.368l.59-.6c4.016-4.091 3.955-10.658-.135-14.676l-6.038-5.93a10.38 10.38 0 0 0-14.675.135l-.59.6a10.375 10.375 0 0 0-.104 14.428l-16.909 17.22-5.981-5.875-3.206 3.264 4.35 4.272-3.202 3.262-4.35-4.272-3.205 3.2Line truncated
);
width: 0 !important;
height: 0 !important;
background-image: url("data:image/svg+xml;utf8,@{svg}") !important;
background-repeat: no-repeat !important;
content: url("data:image/svg+xml,@{svg}");
}
img[src$="trinket-logo.png"] {
@@ -1383,14 +1379,7 @@
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 138 92"><path fill="@{green}" d="M138 46c0 25.41-20.6 46-46 46S46 71.4 46 46 66.6 0 92 0s46 20.6 46 46"/><path fill="@{blue}" d="M115.37 46c0 25.41-20.59 46-46 46s-46-20.6-46-46 20.59-46 46-46 46 20.6 46 46"/><path fill="@{yellow}" d="M92 46c0 25.41-20.6 46-46 46S0 71.41 0 46 20.6 0 46 0s46 20.6 46 46"/><path fill="@{base}" d="m28.22 73.99 28.3-28.82c4.11 3.77 10.49 3.64 14.43-.37l.59-.6c4.02-4.09 3.95-10.66-.13-14.68l-6.04-5.93c-4.09-4.01-10.66-3.95-14.67.14l-.59.6c-3.93 4.01-3.95 10.39-.1 14.43L33.1 55.98l-5.98-5.87-3.21 3.26 4.35 4.27-3.2 3.26-4.35-4.27-3.21 3.26 5.98 5.87-1.78 1.81c-1.77 1.8-1.74 4.7.06 6.47s4.7 1.74 6.47-.06M54.7 34.46c-1.58-1.56-1.61-4.11-.05-5.69l.59-.6a4.026 4.026 0 0 1 5.69-.05l6.04 5.93c1.58 1.56 1.61 4.11.05 5.69l-.59.6c-1.56 1.58-4.11 1.61-5.69.05z"/></svg>'
);
width: 0 !important;
height: 0 !important;
padding-left: 1.5em !important;
padding-top: 1.5em !important;
background-image: url("data:image/svg+xml;utf8,@{svg}") !important;
background-repeat: no-repeat !important;
background-position-y: center;
content: url("data:image/svg+xml,@{svg}");
}
#dragbar {