Skip to content

Instantly share code, notes, and snippets.

@gtnsimon
Created September 10, 2018 22:02
Show Gist options
  • Save gtnsimon/55cb56e9053c35ec88f0f9f719f75072 to your computer and use it in GitHub Desktop.
Save gtnsimon/55cb56e9053c35ec88f0f9f719f75072 to your computer and use it in GitHub Desktop.
Material Angular cheatsheet: mat-icon-button with background-color on hover
/*
<button mat-icon-button>
<mat-icon aria-label="Close main menu">close</mat-icon>
</button>
*/
/*
By default the opacity for the overlay focus is set to 0,
but it could be nice for the user to have a feedback when his mouse is hover the button.
*/
.mat-icon-button:hover .mat-button-focus-overlay {
opacity: 1 !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment