I want to have a hover color on a list I display with Angular 7 and material design. Since the $primary
, $accent
and $warn
colors don't serve this purpose very well, I want to get the same color for hovering that a button has when hovering. I am currently using the candy-app-theme and the dark-theme from the material design multiple-themes example, so I don't define this color myself.
For defining my hovering color I need to query this button hovering color however. Therefore: How do I query this color?
@mixin options-component-theme($theme) {
$primary: map-get($theme, primary);
$accent: map-get($theme, accent);// Use mat-color to extract individual colors from a palette as necessary.
//i have tried these two:
$hover: map-get($theme, hover);
$focused-button: map-get($theme, focused-button);
$primary-color: mat-color($primary);
$accent-color: mat-color($accent);
.listItemFormat:hover {
background-color: $focused-button;
}
I have tried to get the colors via hover
and focused-button
, as listed in this answer by TimTheEnchanter, however this does not work (I end up without any visible hovering effect at all).