There's a bug in the latest Chrome release (49) where CSS like…
background: linear-gradient(currentColor, green);
…isn't updated when the color
of the element changes (e.g. on :hover).
How do I hack around this?
The rendering will update if the element is redrawn (See this question).
e.g.
You can force a redraw when the color
of the element changes by additionally changing an arbitrary property that triggers a redraw.
The property should be…
.box {
width: 200px;
height: 200px;
background: linear-gradient(currentColor, green);
color: #f00;
}
.box:hover {
color: blue;
/* arbitrary webkit-only property that forces a redraw */
-webkit-margin-start: .1px;
}
<div class="box"></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With