Open Bug 2020814 Opened 9 months ago Updated 9 months ago

Add devtools support for the revert-rule keyword

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: emilio, Unassigned)

References

Details

Bug 2017307 introduces a CSS wide keyword called revert-rule, that functions much like other revert keywords (revert, revert-layer).

Not sure if there's anything special implemented for those (https://searchfox.org/firefox-main/search?q=revert-layer&path=devtools%2F&case=false&regexp=false) doesn't seem to indicate so, but maybe they could point to the reversed declaration?

it looks like we have a few places where we hardcode CSS wide keyword (https://searchfox.org/firefox-main/search?q=%22unset%22&path=devtools&case=true&regexp=false), so this might be a good moment to deal with this to
I'll file a dedicated bug

Otherwise, we have Bug 1916151 to add some information next to css wide keywords, which I might tackle as part of a bigger project this year 🤞

In the meantime, having a way to jump to the reversed declaration sounds good. Do you think that finding the rule for the reversed declaration is easy enough that we can confidently do it in the devtools client, in JS, or should we have something in InspectorUtils for that?

Flags: needinfo?(emilio)

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #1)

it looks like we have a few places where we hardcode CSS wide keyword (https://searchfox.org/firefox-main/search?q=%22unset%22&path=devtools&case=true&regexp=false), so this might be a good moment to deal with this to
I'll file a dedicated bug

See Bug 2020911

You already have a model of the cascade right? For revert-rule it's just the next rule. For revert or so might be a bit trickier specially if the UA rules aren't shown. Revert layer is basically "same rule in different layer"

Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.