First of all, do not modify original sources of the library. Once you decide to update it to a newer version, all of your changes will be lost. Much better practice is to override original styles with your own. In order to do that, create a separate css file and add it to your site after angular-material.css
.
To modify background color of buttons in a dialog, you need the following code:
md-dialog .md-button:not([disabled]):hover {
background-color: transparent !important;
}
.md-button:not([disabled]):hover
is a class responsible for styling hover color of md-button controls. In this case, !important
is needed to override original color of buttons. Finally, md-dialog
at the beginning ensures that your styles will be applied only inside dialogs.
Update 1 - Alternative solution
Another but more complicated solution is creating a custom confirmation dialog. This way you can completely change appearence of the dialog by using your own template. You can find more about custom dialogs in the Angular Material documentation:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.