Closed Bug 1838012 Opened 1 year ago Closed 1 year ago

Show parent rules selectors for nested rules

Categories

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

enhancement

Tracking

(firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

We should display the selector of parent rules as we already do for parent at-rules.
Regular rules and at-rules can be nested in complex pattern, so it makes sense to treat them all as "ancestor data", as it's currently the case.

This needs Bug 1835062 so we can access parentRule from a given rule

Blocks: 1838159
Blocks: 1838163
Blocks: 1838164

From the server, when traversing parent rules, we now do include non at-rules
that have a selectorText property, in order to handle CSS nesting.
On the client, we display those selectors as we do for ancestor at-rules (at least
for now, we might add brackets and proper indentation in a follow up).
A test with various nesting is added to check we do display the ancestor rules
as expected.

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/31b8dd660a71 [devtools] Display parent rule selector in ancestor data. r=jdescottes,devtools-reviewers.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Blocks: 1838802
Blocks: 1838803
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: