`clientWidth` and `clientHeight` can cause sync reflows. Can you use `window.innerWidth`?