Unexpected button color change (upgrade from 7.0.5 to 9.5.5) #6698
-
Hello, When testing an upgrade from 7.0.5 to 9.5.5, a primary button is now showing the wrong color. It should be black, but it is showing a blue color. Current source code: https://github.com/podStation/podstation.github.io/tree/cef62084112fb1022b763a3f6c15f181ec25015a (before upgrade) mkdocs.yml: theme:
name: material
features:
- navigation.tabs
palette:
primary: black
accent: teal
icon:
logo: fontawesome/solid/rss
favicon: images/favicon.ico Button: [INSTALL HERE][at-chrome-web-store]{ .md-button .md-button--primary } Is this a bug, or did I miss some non-backwards compatible change? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @dellagustin, [data-md-color-primary=black] .md-button--primary {
background-color: var(--md-primary-fg-color);
border-color: var(--md-primary-fg-color);
} EDIT: |
Beta Was this translation helpful? Give feedback.
The commits that induce the problem reported in the OP were necessary, as they fixed some specificity bugs that led to unreadable links in certain combinations. If you increase the specificity of the selectors in your additional CSS to exceed or match the specificity of the rules employed by the theme, you'll get the previous behavior back.
Note that we do not consider this to be a breaking change, because we don't view CSS specificity as part of our API surface. We need to make changes here and there as we discover bugs, without raising the need for a major release every time we fix something. I hope for your understanding.