Skip to content

Commit 3168bcf

Browse files
committed
refactor: use CSS vars for GitHub Corner colors
1 parent bafc1a2 commit 3168bcf

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

util/gh-pages/index.html

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -594,29 +594,19 @@ <h2 class="panel-title">
594594
></path>
595595
</svg>
596596
<style>
597+
:root {
598+
--theme-background-color: black;
599+
--theme-foreground-color: white;
600+
}
597601
@media (prefers-color-scheme: dark) {
598-
.github-corner svg {
599-
fill: #fff;
600-
color: #fff;
601-
}
602-
.octo-arm {
603-
fill: #151513;
604-
}
605-
.octo-body {
606-
fill: #151513;
602+
:root {
603+
--theme-background-color: white;
604+
--theme-foreground-color: black;
607605
}
608606
}
609-
@media (prefers-color-scheme: light) {
610-
.github-corner svg {
611-
fill: #151513;
612-
color: #fff;
613-
}
614-
.octo-arm {
615-
fill: #fff;
616-
}
617-
.octo-body {
618-
fill: #fff;
619-
}
607+
.github-corner svg {
608+
fill: var(--theme-background-color);
609+
color: var(--theme-foreground-color);
620610
}
621611
.github-corner:hover .octo-arm {
622612
animation: octocat-wave 560ms ease-in-out;

0 commit comments

Comments
 (0)