This content originally appeared on Bram.us and was authored by Bramus!
Dzhavat ran into an interesting performance issue where practically his whole site would repaint when a transition in the header was triggered.
The element being animated is a
span
wrapping some text placed inside anh1
. Theh1
itself is in the upper left corner on the page and contains my name. Initially, only the letter “D” is shows. The remaining part fades-in on hover.I was quite surprised to see the whole page flashing green given the transition was scoped to a very isolated element. I didn’t really see any connection between animating a
span
and causing repaint on the whole page.
The culprit: Stacking Contexts
Debugging layout repaint issues triggered by CSS Transition →
This content originally appeared on Bram.us and was authored by Bramus!
Bramus! | Sciencx (2021-02-18T22:18:37+00:00) Debugging layout repaint issues triggered by CSS Transition. Retrieved from https://www.scien.cx/2021/02/18/debugging-layout-repaint-issues-triggered-by-css-transition/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.