I have some tiles that have an ordinary background-color and show a CSS gradient on hover, and I want to add a transition between these. I've seen this solution, but as far as I can tell the only way to make it work for background colours is to treat it as a gradient by adding two duplicate initial colours and transitioning those:
@property --myColor1 {
syntax: '<color>';
initial-value: #e6e6e6;
inherits: false;
}
@property --myColor2 {
syntax: '<color>';
initial-value: #e6e6e6;
inherits: false;
}
This seems redundant and it feels like there should be a cleaner way to do this. Is there?