diff options
| author | Hamir Mahal <hamirmahal@gmail.com> | 2023-12-10 17:28:26 -0800 |
|---|---|---|
| committer | Hamir Mahal <hamirmahal@gmail.com> | 2023-12-10 17:28:26 -0800 |
| commit | 3168bcf94924e66c6bdf4527bec2b8a657e6dca7 (patch) | |
| tree | c62b2ae9589105d72f563321d2affc846dad1293 | |
| parent | bafc1a2660956232c1b05bf2217d4a6582b890f7 (diff) | |
| download | rust-3168bcf94924e66c6bdf4527bec2b8a657e6dca7.tar.gz rust-3168bcf94924e66c6bdf4527bec2b8a657e6dca7.zip | |
refactor: use CSS vars for GitHub Corner colors
| -rw-r--r-- | util/gh-pages/index.html | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/util/gh-pages/index.html b/util/gh-pages/index.html index a54b9a6409e..a5274eeb349 100644 --- a/util/gh-pages/index.html +++ b/util/gh-pages/index.html @@ -594,29 +594,19 @@ Otherwise, have a great day =^.^= ></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; |
