Skip to content

Commit

Permalink
refactor: use CSS vars for GitHub Corner colors
Browse files Browse the repository at this point in the history
  • Loading branch information
hamirmahal committed Dec 11, 2023
1 parent bafc1a2 commit 3168bcf
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions util/gh-pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -594,29 +594,19 @@ <h2 class="panel-title">
></path>
</svg>
<style>
:root {
--theme-background-color: black;
--theme-foreground-color: white;
}
@media (prefers-color-scheme: dark) {
.github-corner svg {
fill: #fff;
color: #fff;
}
.octo-arm {
fill: #151513;
}
.octo-body {
fill: #151513;
:root {
--theme-background-color: white;
--theme-foreground-color: black;
}
}
@media (prefers-color-scheme: light) {
.github-corner svg {
fill: #151513;
color: #fff;
}
.octo-arm {
fill: #fff;
}
.octo-body {
fill: #fff;
}
.github-corner svg {
fill: var(--theme-background-color);
color: var(--theme-foreground-color);
}
.github-corner:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out;
Expand Down

0 comments on commit 3168bcf

Please sign in to comment.