-
First discussion, yay 🎆 I have an SVG logo and I wonder how should I make it respect the current UI theme of mkdocs? I wanted the logo to have light colors when the theme is dark and vice versa. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is possible:
To see it in action, go to the color setup guide and click on a light color, e.g. Note that using this approach, you cannot change multiple colors. For that to work, you'd have to add two logos and toggle the The logo can be easily changed by overriding the |
Beta Was this translation helpful? Give feedback.
-
thanks @squidfunk! Do you, by any chance, have an example that toggles |
Beta Was this translation helpful? Give feedback.
This is possible:
fill
property (as with the Material logo)To see it in action, go to the color setup guide and click on a light color, e.g.
amber
. Note that this will only work for a single color, i.e. you can fill to white or black, but you may usefill-opacity
like I did in the Material logo.Note that using this approach, you cannot change multiple colors. For that to work, you'd have to add two logos and toggle the
display
property dependent on the theme mode using some extra CSS.The logo can be easily changed by overriding the
logo.html
…