about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHamir Mahal <hamirmahal@gmail.com>2023-12-10 17:28:26 -0800
committerHamir Mahal <hamirmahal@gmail.com>2023-12-10 17:28:26 -0800
commit3168bcf94924e66c6bdf4527bec2b8a657e6dca7 (patch)
treec62b2ae9589105d72f563321d2affc846dad1293
parentbafc1a2660956232c1b05bf2217d4a6582b890f7 (diff)
downloadrust-3168bcf94924e66c6bdf4527bec2b8a657e6dca7.tar.gz
rust-3168bcf94924e66c6bdf4527bec2b8a657e6dca7.zip
refactor: use CSS vars for GitHub Corner colors
-rw-r--r--util/gh-pages/index.html30
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;