Skip to content

Instantly share code, notes, and snippets.

@Angelfire
Created April 17, 2024 16:27
Show Gist options
  • Save Angelfire/b835c286b6b1b6fd4460fc0584696a6e to your computer and use it in GitHub Desktop.
Save Angelfire/b835c286b6b1b6fd4460fc0584696a6e to your computer and use it in GitHub Desktop.
Dark mode in SVG
<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