Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(Toolbar): toolbar-overrides container-text-color does not set var(--mat-sys-on-primary) to icons #30279

Open
1 task
richardsengers opened this issue Jan 7, 2025 · 0 comments · May be fixed by #30280
Open
1 task
Assignees
Labels
area: material/toolbar P4 A relatively minor issue that is not relevant to core functions

Comments

@richardsengers
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

M2 version

Description

Since we now need to override the toolbar to make use of colors, the mat-icons are always dark, even if we set
:root {
@include mat.toolbar-overrides((
container-background-color: var(--mat-sys-primary),
container-text-color: var(--mat-sys-on-primary)
));
}

or maybe an extra override value to set?
mdc-icon-button-icon-color: var(--mat-sys-on-primary)

Reproduction

Stackblits not working at the moment, but It think it is very easy to repsoduce
https://stackblitz.com/edit/bfyxhb6f-qxwgfzjr?file=src%2Fstyles.scss

Expected Behavior

I would expect all icons to have a var(--mat-sys-on-primary) when set to the toolbar container

Actual Behavior

Image

Should be:

Image

Environment

Angular: 19.0.4
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package Version

@angular-devkit/architect 0.1900.5 (cli-only)
@angular-devkit/build-angular 19.0.5
@angular-devkit/core 19.0.5
@angular-devkit/schematics 19.0.5
@angular/cdk 19.0.3
@angular/cli 19.0.5
@angular/material 19.0.3
@angular/material-date-fns-adapter 19.0.3
@schematics/angular 19.0.5
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0

@richardsengers richardsengers added the needs triage This issue needs to be triaged by the team label Jan 7, 2025
@amysorto amysorto added P4 A relatively minor issue that is not relevant to core functions area: material/toolbar and removed needs triage This issue needs to be triaged by the team labels Jan 7, 2025
@amysorto amysorto self-assigned this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/toolbar P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants