I have a bootstrap striped table (.table-striped > tbody > tr:nth-of-type(odd){background-color: #f9f9f9;}
), and I'm drawing the user's attention to the updated row using this little bit of CSS:
.attention { animation: 3s attention; }
@keyframes attention {
0% { background-color: #bcf516; }
100% { background-color: initial; }
}
... and adding class="attention"
dynamically to the <tr>
of which ever row that was updated.
So a table with row #3 updated will look something like this:
<table class="table table-striped">
<tr><td>Row #1</td></tr>
<tr><td>Row #2</td></tr>
<tr class="attention"><td>Row #3</td></tr>
<tr><td>Row #4</td></tr>
</table>
It's almost working like a charm. For white rows, it's perfect. But for gray rows, the fade goes all the way to white, and then suddenly pops back to the initial gray.
How can it be fixed, preferably with CSS only?