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

+6 -29
View File
@@ -375,12 +375,7 @@
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" xml:space="preserve"><path fill="@{blue}" d="M0 0h256v256H0z"/><path d="M150.5 200.5v27.6c4.5 2.3 9.8 4 15.9 5.2s12.6 1.7 19.4 1.7c6.6 0 12.9-.6 18.9-1.9s11.2-3.4 15.7-6.3 8-6.7 10.7-11.4q3.9-7.05 3.9-17.4c0-5-.7-9.4-2.2-13.2s-3.7-7.1-6.5-10.1c-2.8-2.9-6.2-5.6-10.1-7.9s-8.4-4.5-13.3-6.6c-3.6-1.5-6.9-2.9-9.8-4.4-2.9-1.4-5.3-2.8-7.3-4.3s-3.6-3-4.7-4.7-1.6-3.5-1.6-5.6q0-2.85 1.5-5.1c1.5-2.25 2.4-2.8 4.1-3.9 1.8-1.1 4-1.9 6.6-2.5s5.5-.9 8.6-.9c2.3 0 4.7.2 7.3.5s5.1.9 7.7 1.6 5.1 1.6 7.6 2.7c2.4 1.1 4.7 2.4 6.8 3.8v-25.8q-6.3-2.4-13.8-3.6c-7.5-1.2-10.7-1.2-17.1-1.2-6.6 0-12.8.7-18.7 2.1s-11 3.6-15.5 6.6-8 6.8-10.6 11.4-3.9 10.2-3.9 16.6c0 8.2 2.4 15.2 7.1 21.1 4.8 5.8 12 10.7 21.6 14.8 3.8 1.6 7.3 3.1 10.6 4.6s6.1 3 8.5 4.7 4.3 3.4 5.7 5.3 2.1 4.1 2.1 6.5c0 1.8-.4 3.4-1.3 5-.9 1.5-2.2 2.8-3.9 4s-3.9 2-6.6 2.6-5.7.9-9.2.9c-6 0-11.9-1.1-17.8-3.2-5.9-2-11.4-5.1-16.4-9.3m-46-68.8H140V109H41v22.7h35.3V233h28.1V131.7z" fill-rule="evenodd" clip-rule="evenodd" fill="@{base}"/></svg>'
);
height: 0 !important;
width: 0 !important;
padding-left: 20px;
margin-left: 1rem;
padding-top: 20px;
background: url("data:image/svg+xml,@{svg}") no-repeat;
content: url("data:image/svg+xml,@{svg}");
}
/* Navigation tabs */
@@ -538,14 +533,10 @@
/* Back button inside file */
._450b46e9 {
height: 0 !important;
width: 0 !important;
padding-top: 16px;
padding-left: 12px;
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125" fill="@{text}"><path d="M50.4 74.7 23.7 50l26.7-24.7-5.4-5.9L11.9 50 45 80.6z"/><path d="M82.6 19.4 49.6 50l33 30.6 5.5-5.9L61.4 50l26.7-24.7z"/></svg>'
);
background: url("data:image/svg+xml,@{svg}") no-repeat;
content: url("data:image/svg+xml,@{svg}");
}
ul li {
@@ -556,8 +547,6 @@
}
img {
height: 0 !important;
width: 0 !important;
@folder: escape(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 122.5" fill="@{subtext0}"><path d="M37.9 18.4H13v61.2h72V25H49zM79 73.6H19V44h60zM79 38H19V24.4h17.2L47.3 31H79z"/></svg>'
);
@@ -565,14 +554,10 @@
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125" fill="@{subtext0}"><path d="M82.2 10.7H38.7l-20.9 19v59.6h64.4zm-44.6 6.4v11.2H25.3zm40.6 68.2H21.8v-53h19.8V14.7h36.6z"/><path d="M34.3 44.7h31.4v4H34.3zm0 13.2h31.4v4H34.3zm0 13.1h31.4v4H34.3z"/></svg>'
);
&._1528cda6 {
padding-top: 25px;
padding-left: 20px;
background: url("data:image/svg+xml,@{folder}") no-repeat;
content: url("data:image/svg+xml,@{folder}");
}
&._7ec1ed32 {
padding-top: 22.5px;
padding-left: 18px;
background: url("data:image/svg+xml,@{file}") no-repeat;
content: url("data:image/svg+xml,@{file}");
}
}
}
@@ -889,11 +874,7 @@
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38.36 38.36"><circle cx="19.18" cy="19.18" r="18.53" fill="none" stroke="@{green}" stroke-miterlimit="10" stroke-width="1.3"/><path d="M25.63 26.84h-4.46a.37.37 0 0 1-.37-.36v-6h-3v6a.36.36 0 0 1-.36.36h-4.51a.94.94 0 0 1-.93-.94V19a1.6 1.6 0 0 1-.38 0 .89.89 0 0 1-.74-.31A1.31 1.31 0 0 1 11 16.9l7.42-6.42a1.28 1.28 0 0 1 1.58-.05.2.2 0 0 1 .09.05l7.42 6.42a1.31 1.31 0 0 1 .14 1.82.86.86 0 0 1-.74.31 1.5 1.5 0 0 1-.37 0v6.87a.94.94 0 0 1-.91.94" fill="@{green}"/></svg>'
);
height: 0 !important;
width: 0 !important;
padding-left: 42px;
padding-top: 42px;
background: url("data:image/svg+xml,@{svg}") no-repeat;
content: url("data:image/svg+xml,@{svg}");
}
/* Step 2: invite members */
img[src="https://static-production.npmjs.com/d6654c911c7cf2159948148754c95bb6.svg"]
@@ -901,11 +882,7 @@
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38.36 38.36"><circle cx="19.18" cy="19.18" r="18.53" fill="none" stroke="@{surface2}" stroke-miterlimit="10" stroke-width="1.3"/><path d="M25.67 20.87a4.95 4.95 0 1 0 4.94 4.94 5 5 0 0 0-4.94-4.94m0 9a4 4 0 1 1 4-4.05 4.06 4.06 0 0 1-4 4.04Z" fill="@{text}"/><path d="M28.2 25.41h-2v-2a.45.45 0 0 0-.9 0v2h-2a.45.45 0 0 0 0 .9h2v2a.45.45 0 0 0 .9 0v-2h2a.45.45 0 0 0 0-.9m-7.12-8.58A5 5 0 0 1 19.9 19a.48.48 0 0 0-.13.32v.86a.7.7 0 0 0 0 .14c.17.54.37.66 1.28 1.14a.45.45 0 0 0 .61-.19.44.44 0 0 0-.19-.6c-.69-.37-.77-.41-.82-.56v-.61a5.9 5.9 0 0 0 1.23-2.26 1.82 1.82 0 0 0 .33-2.44V13c0-2.41-1.5-3.8-4.11-3.8S14 10.62 14 13v1.78a1.8 1.8 0 0 0-.3 1.29 1.84 1.84 0 0 0 .63 1.15 5.9 5.9 0 0 0 1.23 2.26v.59c-.14.24-1 1-5.8 2.87a1.07 1.07 0 0 0-.68 1v2.15a1.07 1.07 0 0 0 1.06 1.07h9.23a.45.45 0 0 0 0-.9h-9.23a.17.17 0 0 1-.16-.17v-2.16a.15.15 0 0 1 .1-.15c5.28-2 6.18-2.9 6.36-3.49a.3.3 0 0 0 0-.13v-.86a.44.44 0 0 0-.13-.32 5.1 5.1 0 0 1-1.18-2.15.44.44 0 0 0-.17-.25.93.93 0 0 1-.18-1.36.5.5 0 0 0 .1-.29V13c0-1.87 1.14-2.9 3.22-2.9s3.21 1 3.21 2.9v1.93a.46.46 0 0 0 .11.29 1 1 0 0 1 .21.73.94.94 0 0 1-.39.63.45.45 0 0 0-.16.25" fill="@{text}"/></svg>'
);
height: 0 !important;
width: 0 !important;
padding-left: 42px;
padding-top: 42px;
background: url("data:image/svg+xml,@{svg}") no-repeat;
content: url("data:image/svg+xml,@{svg}");
}
div:has(> form[action="/org/create"]) {
color: @text;