Created
April 17, 2024 16:27
-
-
Save Angelfire/b835c286b6b1b6fd4460fc0584696a6e to your computer and use it in GitHub Desktop.
Dark mode in SVG
This file contains 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 xmlns="http://www.w3.org/2000/svg" width="16" height="16"> | |
<style> | |
path { | |
fill: #000; | |
} | |
@media (prefers-color-scheme: dark) { | |
path { | |
fill: #fff; | |
} | |
} | |
</style> | |
<path fill-rule="evenodd" d="M0 0h16v16H0z"/> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment