Contact [email protected]

ExplainerNone

SpecificationNone

Summary

The 'revert-rule' keyword rolls back the cascade to the previous *rule*,
similar to how revert-layer
<https://drafts.csswg.org/css-cascade-5/#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).


Blink componentBlink>CSS
<https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3ECSS%22>

Motivation

None


Initial public proposal
CSSWG resolution
<https://github.com/w3c/csswg-drafts/issues/10443#issuecomment-2627865962> to
add the keyword.

TAG reviewNone

TAG review statusPending

Risks
The style team was initially worried that keeping track of all (or most) of
the declarations in the cascade in a "revertible" form would cause
performance regressions, but the benchmarks run so far show no significant
difference.

Interoperability and Compatibility

None


*Gecko*: No signal

*WebKit*: No signal

*Web developers*:

https://blog.kizu.dev/functional-capturing/#:~:text=This%20CSS%2Dwide%20keyword%20will%20be%C2%A0invaluable


*Other signals*:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that
it has potentially high risk for Android WebView-based applications?

None


Debuggability

None


Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
?No

Flag name on about://flagsNone

Finch feature nameNone

Non-finch justificationNone

Requires code in //chrome?False

Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5146458504429568?gate=5171636433190912

This intent message was generated by Chrome Platform Status
<https://chromestatus.com/>.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKFBnUrPRGxEbO1Uz3NnLJongnyknP%2BQ3zTRdpP%3DeFEJiza-Zg%40mail.gmail.com.

Reply via email to