Re: [csswg-drafts] [cssom] Proposal: CSS.assign (#4486)

> It would be lovely to have the ability to define multiple CSS properties at once, without causing reflows or repaint during each property that might trigger those.

Doesn't this happen already? AFAIK, unless you force it, styles are not applied synchronously.

For example, if I go to https://drafts.csswg.org/cssom/ and run
```js
for (let i = 0; i < 100; ++i) {
  document.body.style.width = Math.random() * 1000 + "px";
  document.body.offsetLeft;
}
```
it takes like 8 seconds, because I'm forcing layout at each iteration. But if I remove the `offsetLeft` line, it's a single millisecond.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4486#issuecomment-550350301 using your GitHub account

Received on Wednesday, 6 November 2019 15:04:10 UTC