material icon indicating copy to clipboard operation
material copied to clipboard

Multiple themes don't work properly within md-toolbar

Open voithos opened this issue 11 years ago • 3 comments

There appears to be a bug with the most recent version of Angular Material (v0.11.0) that's affecting one of our UI elements. Here's a CodePen that reproduces the problem: https://codepen.io/anon/pen/JYbdeP

Essentially, we have a md-toolbar that is configured with a specific theme, but its contents are configured with a different theme. In the past, this would work fine, but we're now seeing that certain elements (e.g. button text) retain the toolbar's theme instead of the contents' theme.

I believe this is occurring due to a CSS specificity problem here: https://github.com/angular/material/blob/e22cd6b364077f2211a2b1febed7e4081f992c56/src/components/toolbar/toolbar-theme.scss#L1

voithos avatar Sep 25 '15 21:09 voithos

Same issue here in one of my apps. Repro here: https://codepen.io/Splaktar/pen/gaLPYB

mprentic-harris avatar Sep 25 '15 23:09 mprentic-harris

+1

breity avatar Sep 29 '15 20:09 breity

This isn't working in my CodePen or the Forked CodePen from the original report using HEAD.

This style:

md-toolbar:not(.md-menu-toolbar) .md-button {
    color: rgba(255,255,255,0.87);
}

Is overriding this style:

.md-button.md-accent {
    color: rgb(0,200,83);
}

mprentic-harris avatar Oct 19 '15 16:10 mprentic-harris