I am trying implement angular material badge in my menu list.
Is it possible to position the badge in the center of list item?
Official document says : "By default, the badge will be placed above after. The direction can be changed by defining the attribute matBadgePosition follow by above|below and before|after."
But I need exclude this above|below position option
Or at the least if it is possible to set visible the entire badge inside the list-item
Changing mat Badge Position By default, material badge will be displayed on top right corner of the element. We can change the position of mat Badge by using matBadgePosition input.
A badge is a visual indicator for numeric values such as tallies and scores. ExamplesCodeUsage.
Since Angular Material uses 'Material Icons' Font-Family, the icon size depends on font-size. Therefore, if you want to modify the size of the icon then you change its font-size in your CSS file. You have to set the width and height too.
Check this blitzy
Solved using CSS
.mat-badge-medium.mat-badge-above .mat-badge-content {
top: -3px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With