Closed
Description
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
Unknown
Description
Implementing a simple mat-icon with a matBadge="5", the number 5 is not shown in badge, it works ok when using one of the pre-defined themes i.e. Deep Purple & Amber, but when I select custom theme on adding angular/material, without changing the default colors, the number is not shown.
Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-adgwky?file=src%2Fmain.ts
Steps to reproduce:
- ng new test-app (scss)
- ng add @angular/material ...
? Choose a prebuilt theme name, or "custom" for a custom theme: Custom
? Set up global Angular Material typography styles? Yes
? Include the Angular animations module? Include and enable animations
- imported MatIconModule & MatBadgeModule into app.component.ts
- Copied & pasted same code from https://material.angular.io/components/badge/examples (ts/html/css) to app.*
Expected Behavior
number is shown in badge when applied to mat-icon
Actual Behavior
badge is "blank"
Environment
- Angular: 17.2.2
- CDK/Material: 17.2.1
- Browser(s): Chrome/Firefox/Stackblitz (not tried any others)
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu