W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [cssom-1] Replace steps of set a CSS declaration with some constraints

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Sun, 15 Jul 2018 12:36:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-405089181-1531658164-sysbot+gh@w3.org>
I don't think we need a separate issue for that. I can put the problem and add Agenda+ on this PR directly.

So in #1898 we resolved (again) that seting property should always append the new declaration to the end of the declaration block, which was added to spec in #2516. However, this change has a performance impact, because browsers would be required to trigger mutation observer, and flush style. (To be honest, flushing style may be avoidable, but it could be complicated to fix given how things are working nowadays.)

Because of this, [the change to Firefox has been put behind a pref and off by default](https://bugzilla.mozilla.org/show_bug.cgi?id=1461285), and [the change to Chrome has been backed out](https://bugs.chromium.org/p/chromium/issues/detail?id=845944#c35).

In the end, in #1898 what we really want is that physical properties and flow-relative properties can override each other correctly. There are possible algorithms to realize that without sacrificing performance in usual cases, but such algorithms may be non-trivial and it could become tricky to spec and have everyone agree on one.

Thus, instead I propose that we just put down some basic requirements for this algorithm and allow implementations to explore. There would be observable behavior difference, but I don't think that would be too bad. If authors have been relying on the order, the original change itself would have been a breaking change.

-- 
GitHub Notification of comment by upsuper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/2924#issuecomment-405089181 using your GitHub account
Received on Sunday, 15 July 2018 12:36:15 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:53 UTC