Skip to content
public-library›Rules›JavaScript›Avoid layout thrashing

Avoid layout thrashing

Do not interleave DOM style writes with layout reads. Read all the layout values you need first, then make all the style changes, or change styles through a CSS class.

In the full rule