Created
July 21, 2024 11:26
-
-
Save e-oz/a0ad79c40706004d6b0ad6d6c7c14af5 to your computer and use it in GitHub Desktop.
Center the icon inside an Angular Material mat-icon-button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you use some "CSS reset" (Tailwind, Bootstrap, | |
// modern-normalize...), then mat-icon inside the | |
// Angular Material mat-icon-button will not be centered | |
// correctly - it will be shifted 2 pixels down. | |
// Here is the fix: | |
.mdc-icon-button { | |
display: flex !important; | |
flex-flow: row; | |
align-items: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment