When the background is red, onclick of grid cell I would like the background to turn grey but the text to remain red, yellow, green etc. How do I do that?
@mixin hoverable-row($bg-color, $highlight-color: $gray-c5, $hover-color: null) {
&:not(.p-highlight) {
background-color: $bg-color;
&:hover {
@if ($hover-color) {
background-color: $hover-color;
}
@else {
background-color: rgba($bg-color, 0.6);
}
}
}
}
tr.p-element.p-selectable-row {
&.row-bg-default {
@include hoverable-row($default-background, $hover-color: $default-highlight);
}
&.row-bg-red {
@include hoverable-row($red-background);
}
&.row-bg-green {
@include hoverable-row($green-background);
color: inherit;
}
&.row-bg-yellow {
@include hoverable-row($yellow-background);
color: inherit;
}
}