[css-cascade] How do Cascade Layers interact with !important? · Issue #4971 · w3c/csswg-drafts (original) (raw)

This is in relation to #4470 custom-origin proposal, and Cascade 5.

The predefined origins are stacked such that important origins reverse the order of their normal counterparts:

Not Intertwined:

When adding custom origins (subset in the author origins), I think it’s clear that important and normal layers should remain the outer layer, rather than being subset layers within an origin:

Not:

The !important flag is not meant for that kind of internal layering (we have specificity for that), but for balancing power between and across origins.

Reverse or maintain order?

It’s less clear if reverse-ordering should be maintained, or if that should be customizable. When origins are static and represent different concerns, the reversal ensures that lower origins can get final say when necessary. Since custom origins are not preset, and new origins could be added at either end, I think: