Re: [csswg-drafts] [css-cascade][css-syntax] New `!revertable` flag to mark a declaration as "can be reverted when IACVT" (#10443)

> This seems orthogonal to the issue we’re discussing?

It isn't orthogonal. If we are only reverting to the same property, we could just shift down all declarations for the same property to the last one, then store the values together as a list, say that `getPropertyValue` provides the last one, and add `getPropertyValues` to get all of them. Similar for the setter and the priority. But we can at least keep the same indexing as now.

However, if we can revert to other properties, we can't keep assuming that a given property can only appear at most at one index. So it seems the API and the data structures used by browsers will need considerably bigger changes.

> I would be strongly opposed to doing this as a rule. 

Well, I would be strongly opposed to not exposing the necessary information via CSSOM.

And it doesn't seem great to pollute `CSSStyleDeclaration` with several things that aren't needed by normal style rules.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 15 June 2024 22:25:05 UTC