Is it possible to use dark and light custom icons? #4229
-
I see the built-in Material for MkDocs icons change their color automatically when changing the theme: white icons under the dark theme and black icons in the light theme. This happens without adding any extra code to the Markdown file. Is it possible to achieve the same effect with custom icons? I may be wrong, but I haven't seen this question posted before and can't find any information in the Material for MkDocs documentation. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Yes that's definitely possible. You must make sure that your SVG does not contain any |
Beta Was this translation helpful? Give feedback.
Yes that's definitely possible. You must make sure that your SVG does not contain any
fill
orstroke
attributes. This is likely added by vector graphic programs when exporting SVGs, so remove them and you should see the colors taking effect.