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

+4 -16
View File
@@ -1001,12 +1001,7 @@
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="@{text}"><path d="M29.293 13.167a7.77 7.77 0 0 0-.668-6.388 7.87 7.87 0 0 0-8.472-3.774A7.77 7.77 0 0 0 14.288.39a7.87 7.87 0 0 0-7.504 5.446 7.78 7.78 0 0 0-5.201 3.773 7.87 7.87 0 0 0 .968 9.223 7.78 7.78 0 0 0 .668 6.388 7.87 7.87 0 0 0 8.473 3.774 7.78 7.78 0 0 0 5.866 2.615 7.87 7.87 0 0 0 7.506-5.449 7.78 7.78 0 0 0 5.2-3.773 7.87 7.87 0 0 0-.97-9.22M17.559 29.57a5.83 5.83 0 0 1-3.746-1.354c.048-.026.131-.071.185-.105l6.216-3.59a1.01 1.01 0 0 0 .511-.885v-8.765l2.627 1.517a.1.1 0 0 1 .052.072v7.258a5.86 5.86 0 0 1-5.846 5.85M4.989 24.2a5.83 5.83 0 0 1-.698-3.92c.047.028.126.077.185.11l6.216 3.59a1.01 1.01 0 0 0 1.021 0l7.59-4.382v3.034a.1.1 0 0 1-.038.08l-6.284 3.628a5.857 5.857 0 0 1-7.992-2.142M3.354 10.63A5.83 5.83 0 0 1 6.4 8.065l-.003.214v7.181a1.01 1.01 0 0 0 .51.884l7.589 4.382-2.627 1.517a.1.1 0 0 1-.089.008L5.495 18.62a5.857 5.857 0 0 1-2.141-7.99m21.587 5.024-7.59-4.382 2.628-1.516a.1.1 0 0 1 .088-.008l6.284 3.628a5.852 5.852 0 0 1-.904 10.558v-7.396a1.01 1.01 0 0 0-.507-.884m2.615-3.936-.184-.11-6.217-3.59a1.01 1.01 0 0 0-1.021 0L12.544 12.4V9.366a.1.1 0 0 1 .038-.08l6.283-3.625a5.851 5.851 0 0 1 8.691 6.059m-16.439 5.408-2.628-1.517a.1.1 0 0 1-.051-.072V8.281a5.851 5.851 0 0 1 9.594-4.492l-.184.105-6.217 3.59a1.01 1.01 0 0 0-.51.884zm1.428-3.078 3.38-1.952 3.381 1.951v3.902l-3.38 1.951-3.38-1.951z"/></svg>'
);
height: 0 !important;
width: 0 !important;
padding-left: 32px !important;
padding-top: 32px !important;
margin-top: 32px;
background: url("data:image/svg+xml,@{svg}") no-repeat !important;
content: url("data:image/svg+xml,@{svg}");
}
.title {
@@ -1053,31 +1048,24 @@
@orange: mix(@red, @yellow);
.social-logo {
height: 0 !important;
width: 0 !important;
padding-left: 20px !important;
padding-top: 20px !important;
}
img[alt="Google logo"] {
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20" width="20" height="20"><defs><path id="a" d="M18.542 8.333H10v3.542h4.917c-.459 2.25-2.375 3.542-4.917 3.542C7 15.417 4.583 13 4.583 10S7 4.583 10 4.583c1.292 0 2.458.458 3.375 1.208l2.667-2.667C14.417 1.708 12.333.833 10 .833 4.917.833.833 4.917.833 10S4.916 19.167 10 19.167c4.583 0 8.75-3.333 8.75-9.167 0-.542-.083-1.125-.208-1.667"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" fill="@{orange}" d="M0 15.417V4.583L7.083 10z"/><path clip-path="url(#b)" fill="@{red}" d="M0 4.583 7.083 10 10 7.458l10-1.625V0H0z"/><path clip-path="url(#b)" fill="@{green}" d="m0 15.417 12.5-9.583 3.292.417L20 0v20H0z"/><path clip-path="url(#b)" fill="@{blue}" d="M20 20 7.083 10 5.416 8.75l14.583-4.167z"/></svg>'
);
background-image: url("data:image/svg+xml;charset=utf-8,@{svg}");
content: url("data:image/svg+xml,@{svg}");
}
img[alt="Microsoft logo"] {
@svg: escape(
'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="@{orange}" d="M.952.952h8.571v8.571H.952z"/><path fill="@{sapphire}" d="M.952 10.476h8.571v8.571H.952z"/><path fill="@{green}" d="M10.476.952h8.571v8.571h-8.571z"/><path fill="@{yellow}" d="M10.476 10.476h8.571v8.571h-8.571z"/></svg>'
);
background-image: url("data:image/svg+xml;charset=utf-8,@{svg}");
content: url("data:image/svg+xml,@{svg}");
}
img[alt="Apple logo"] {
@svg: escape(
'<svg width="20" xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 20 20"><path fill="@{text}" d="M17.691 15.324a10.3 10.3 0 0 1-1.025 1.842q-.81 1.152-1.32 1.595-.79.727-1.696.747-.652 0-1.567-.374-.916-.373-1.687-.373-.808 0-1.735.373-.928.376-1.499.394-.87.037-1.735-.767-.553-.482-1.381-1.652-.888-1.249-1.46-2.9-.613-1.783-.613-3.456 0-1.916.829-3.302.65-1.112 1.736-1.756c1.086-.644 1.505-.648 2.347-.662q.69.001 1.815.422 1.123.422 1.44.423.238 0 1.596-.499 1.283-.462 2.17-.385 2.407.193 3.609 1.9-2.151 1.305-2.129 3.647.02 1.825 1.321 3.032a4.4 4.4 0 0 0 1.32.866 15 15 0 0 1-.336.884M14.013.852q0 1.43-1.042 2.667c-.838.979-1.851 1.545-2.95 1.456a3 3 0 0 1-.022-.361c0-.915.398-1.894 1.106-2.695q.53-.608 1.347-1.011.816-.398 1.541-.436.02.191.02.381z"/></svg>'
);
background-image: url("data:image/svg+xml;charset=utf-8,@{svg}");
content: url("data:image/svg+xml,@{svg}");
}
}
}