I'm using React with Material Ui, and encountered a case in which I render an indeterminate Progress Bar when loading a resource. While not showing the progress bar, it still takes up space via visibility: hidden
css property.
In doing so, the progress bars' css animation also remains active, and while invisible, can still be viewed running with the element inspector.
To disable that, I've changed the mode of the progress bar to determinate(without an animation), like so:
<Fade in={visible}>
<LinearProgress variant={visible ? 'indeterminate' : 'determinate'} />
</Fade>
My question is: How does an invisible css animation affect performance and repainting? Does disabling it matters?
EDIT: From what I checked, while it does not cause a repaint, the animation does still run and recalculates style and layout while hidden (at least in chrome and firefox).