Last active
August 16, 2021 23:27
-
-
Save JamesGelok/8cac9adba5f180f30fbd164c0d922abb to your computer and use it in GitHub Desktop.
GitHub Light Mode Dark Mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <svg fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <style> | |
| .light-text { | |
| fill: black; | |
| } | |
| .dark-text { | |
| fill: white; | |
| } | |
| .light-mode-only { | |
| display: unset; | |
| } | |
| .dark-mode-only { | |
| display: none; | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| .light-mode-only { | |
| display: none; | |
| } | |
| .dark-mode-only { | |
| display: unset; | |
| } | |
| } | |
| </style> | |
| <text x="25px" y="25px" class="dark-mode-only dark-text">You're Using Dark Mode</text> | |
| <text x="25px" y="25px " class="light-mode-only light-text">You're Using Light Mode</text> | |
| </svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment