Tooltips and colour palette toggle #8219
-
Hi all, I previously implemented tooltips (https://squidfunk.github.io/mkdocs-material/reference/tooltips/) and have now just added a colour palette toggle (https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-palette-toggle). However, with my tooltips using a blue text (as defined below), it means they're hard to read when the UI is in dark mode (blue on black):
I tried removing the "colour blue" line. By default light/dark mode use the same colour as the main text font for the tooltip. However, the side effect of that is the tooltip doesn't stand out clearly against the background. Is there a way of defining a light/dark font colour for the tooltip? P. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @paulmmoloney, [data-md-color-scheme="slate"] [role=tooltip] > .md-tooltip2__inner {
color: #fff;
} Or maybe use The rest of the settings will be inherited from the previous CSS rule for the default palette. |
Beta Was this translation helpful? Give feedback.
Hello @paulmmoloney,
to change a setting for dark mode you'd use the approach mentioned here:
https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-color-schemes
Or maybe use
color: inherit
to use the same color as the parent object 🤔The rest of the settings will be inherited from the previous CSS rule for the default palette.