I’ve gotten good help with these things on the forum before, so I try again.
I have a situation which I feel should be very simple, but that I just can’t get to work (even after following a lot of “AI” suggested red herrings). I’m working on trying to make the UI log viewer automatically reconnect if it loses the connection to OH for some reason (brief network outage for example). I wish to indicate that it is trying to reconnect while that is happening, and I want to do that without adding anything “extra” to the layout if possible.
I thus figured that I could make the “play button” in the log viewer blink until it managed to reconnect. This should normally be a rare occurrence, but it shows that “something is happening” - and you can abort the reconnect attempt by clicking the “stop button”.
This is all working nicely, except that I think that animating the icon color is a bit “jerky” at times. So, I read that animating color is very heavy for the browser, because it has to constantly repaint - and that by using opacity instead, the repainting can be avoided. Great, sound like the way to go.
The problem is that, to use opacity to change between colors, you must had to identical objects on top of each other, one with one color, the other with the other color, and then animate the opacity of the “top layer object”. And herin lies the problem.
Since the exact glyph used is dynamic, depending on the theme used, I don’t want to hard-code the character/glyph used. I’d also prefer to do as few changes as possible to the Vue template/HTML, so I was ideally seeking to use a CSS pseudo element (::after) to make the overlay. But, whatever I do, I can’t get this to work.
I only want the overlay to apply to the icon/glyph, not the surrounding background. I’ve tried everything I’ve found of blending and clipping, but it seems like it’s “impossible” to get the overlay to actually use the “text” of the icon to decide where to render.
This seems like it should be such a simple task that I can’t quite believe that I can’t get it to work. Still, I’m just not able to. It just shouldn’t be that hard to animate a font-based icon between two colors in a way that a browser can handle efficiently… what am I missing?

