Overriding theme color variable started to require !important
#5635
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Thanks for asking. Yes, we had to make some changes to make colors more stable across schemes, specifically because of #5206, which might make it necessary to adjust some overrides. Changes were done in 6fe1d55. Could you please share a minimal reproduction of your issue? Without this, it's hard to anticipate what's the problem, because we don't know how you configured your site or what else might be interferring. And no, |
Beta Was this translation helpful? Give feedback.
-
Hi @hellt , on your screenshot you can see that the [data-md-color-scheme="slate"][data-md-color-primary="indigo"] rule from the [data-md-color-scheme="slate"] rule from the The rule from the EDIT: The "range" is in fact specificity https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity |
Beta Was this translation helpful? Give feedback.
Hi @hellt , on your screenshot you can see that the
rule from the
palette.css
file isn't overridden by yourrule from the
nokia.css
file.The rule from the
palette.css
file is more specific than the rule from the custom file, it covers both thedata-md-color-scheme
anddata-md-color-primary
. Instead of using!important
increase the "range" of your rule to be as explicit as the rule from mkdocs-material, in other words add the[data-md-color-primary="indigo"]
part.EDIT: The "range" is in fact specificity https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity