refactor: use CSS vars for GitHub Corner colors

This commit is contained in:
Hamir Mahal 2023-12-10 17:28:26 -08:00
parent bafc1a2660
commit 3168bcf949
No known key found for this signature in database

View file

@ -594,29 +594,19 @@ Otherwise, have a great day =^.^=
></path> ></path>
</svg> </svg>
<style> <style>
:root {
--theme-background-color: black;
--theme-foreground-color: white;
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.github-corner svg { :root {
fill: #fff; --theme-background-color: white;
color: #fff; --theme-foreground-color: black;
}
.octo-arm {
fill: #151513;
}
.octo-body {
fill: #151513;
} }
} }
@media (prefers-color-scheme: light) { .github-corner svg {
.github-corner svg { fill: var(--theme-background-color);
fill: #151513; color: var(--theme-foreground-color);
color: #fff;
}
.octo-arm {
fill: #fff;
}
.octo-body {
fill: #fff;
}
} }
.github-corner:hover .octo-arm { .github-corner:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out; animation: octocat-wave 560ms ease-in-out;