Last active
July 11, 2021 15:55
-
-
Save jab/c7345030f0f664ddaf229d0baeb53bf4 to your computer and use it in GitHub Desktop.
dark-mode-aware-svg-demo
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" viewBox="0 0 8 10" style="background: red"> | |
<style> | |
path { fill: #333; } | |
@media (prefers-color-scheme: dark) { | |
path { fill: #aaa; } | |
} | |
</style> | |
<path d="M7.944 4.792a.416.416 0 0 1 0 .416.392.392 0 0 1-.15.15l-5.83 3.527a.374.374 0 0 1-.201.058.405.405 0 0 1-.205-.055.386.386 0 0 1-.15-.153.428.428 0 0 1-.053-.208V1.473a.428.428 0 0 1 .053-.208.386.386 0 0 1 .15-.153.41.41 0 0 1 .407-.003l5.83 3.528a.438.438 0 0 1 .15.155z"/> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment