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 -10
View File
@@ -245,21 +245,13 @@
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15.673" viewBox="0 0 16 15.673"><path fill="@{subtext0}" fill-rule="evenodd" d="M7.976 0C3.566 0 0 3.592 0 8.035a8.03 8.03 0 0 0 5.454 7.623c.396.08.541-.173.541-.386 0-.186-.013-.825-.013-1.49-2.219.479-2.681-.958-2.681-.958-.357-.931-.885-1.171-.885-1.171-.726-.492.053-.492.053-.492.806.053 1.228.825 1.228.825.713 1.224 1.862.878 2.324.665.066-.519.277-.878.502-1.078-1.77-.186-3.632-.878-3.632-3.965 0-.878.317-1.596.819-2.155-.079-.2-.357-1.024.079-2.129 0 0 .673-.213 2.192.825a7.7 7.7 0 0 1 1.994-.266c.673 0 1.36.093 1.994.266 1.519-1.038 2.192-.825 2.192-.825.436 1.104.158 1.929.079 2.129.515.559.819 1.277.819 2.155 0 3.087-1.862 3.765-3.645 3.965.291.253.541.732.541 1.49 0 1.078-.013 1.942-.013 2.208 0 .213.145.466.541.386a8.03 8.03 0 0 0 5.454-7.623C15.952 3.592 12.374 0 7.976 0" clip-rule="evenodd"/></svg>'
);
height: 0 !important;
width: 0 !important;
padding-left: 16px !important;
padding-top: 16px !important;
background: url("data:image/svg+xml,@{svg}") no-repeat !important;
content: url("data:image/svg+xml,@{svg}");
}
img[alt="X Logo"] {
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="16" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="16"><path fill="@{subtext0}" d="M16.99 0h3.308l-7.227 8.26 8.502 11.24h-6.657l-5.214-6.817L3.736 19.5H.426l7.73-8.835L0 0h6.826l4.713 6.231zm-1.161 17.52h1.833L5.83 1.876H3.863z" stroke="none"/></svg>'
);
height: 0 !important;
width: 0 !important;
padding-left: 16px !important;
padding-top: 16px !important;
background: url("data:image/svg+xml,@{svg}") no-repeat !important;
content: url("data:image/svg+xml,@{svg}");
}
}
}