The 'revert-rule' keyword rolls back the cascade to the previous rule, similar to how revert-layer rolls back the cascade to the previous layer. For example: ``` div { color: green; } div { color: revert-rule; /* Effectively green */ } ``` This is especially useful in combination with conditionals, as it allows eliminating the current rule if some condition is not met: ``` div { display: if(style(--layout: fancy): grid; else: revert-rule); } ```
Without 'revert-rule', you would either need to know which value exactly you would be "reverting" to (i.e. specify a literal 'block'/'inline'/etc in place of 'revert-rule'), or use 'revert-layer' (which requires wrapping your rule in an otherwise unnecessary anonymous layer).
None
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
No milestones specified