Re: [csswg-drafts] [css-cascade-4] Revert at computed-value time (#4155)

@fantasai Yeah, I wish css-logical didn't set this precedent ...

Though I'd argue that this `revert` case is worse. As @Loirooriol is pointing out (I think), the logical properties _can_ be implemented as separate cascadable properties. As long as we keep around the cascade criteria (origin, importance, order of appearance, etc) for each value in the cascade, we can figure out whether a given logical property should win over (what turned out to be) the corresponding physical property computed-value time. So in a way we can translate the cascade-time dependency into a computed-value-time-only dependency that's not much worse than the dependency between `font-size` and `em` units.

In order to do the same in this case, we'd have to keep around one cascaded value for each cascade origin, or something. (This is what WebKit is doing, incidentally, and it's not pretty).

FF has a very elegant solution to `revert`: rules are applied in reverse order, such that `revert` simply becomes "just forget the current cascaded value up until this point". (We'll get to the reverted-to value eventually). Computed-value time `revert` breaks this, and it's a shame IMO.

I may be drama-queening a little right now, but I worry slightly that CSS will deteriorate into nondescript mystery meat without discernible properties if we keep chipping away at former invariants.

Perhaps we should instead specify that, in forced colors mode, all UA rules become !important or something.

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

Received on Saturday, 3 August 2019 20:21:18 UTC