After upgrading to Angular and Angular Material version 18.0.0, the button text color incorrectly takes on the button’s background color, making the text unreadable. This issue did not exist in version 17.0.0.
`@use ‘@angular/material’ as mat;
@include mat.core();
@import ‘./color.scss’;
// @include mat.all-component-themes(get-light-theme($blue-theme));
$kids-theme: mat.m2-define-light-theme(
(
color: (
primary: mat.m2-define-palette($cyan-theme),
accent: mat.m2-define-palette($yellow-theme),
),
)
);
@include mat.all-component-themes($kids-theme);`
The button text color should remain distinct from the background color as specified in the theme settings.
The button text color adopts the button’s background color, making the text difficult to read.
stackBiz-Link
stackblitz
Dikshit Patel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.