Closed Bug 1999997 Opened 4 months ago Closed 3 months ago

Allow to add rule for pseudo element nodes

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox147 fixed)

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We disable the add rule button if the selected element is a anonymous node https://searchfox.org/firefox-main/rev/4fd0fa7e5814c0b51f1dd075821988377bc56cc1/devtools/client/inspector/rules/rules.js#770-771,774-775

refreshAddRuleButtonState() {
  const shouldBeDisabled =
...
    this.inspector.selection.isAnonymousNode();
  this.addRuleButton.disabled = shouldBeDisabled;

this means that you can't add a rule for ::before or ::view-transition nodes
we should allow it

Depends on: 1165122

In addNewRule, we retrieve the binding element and pseudo from the passed node,
and if it is a pseudo element, we append the pseudo element type at the end of
the selector.
Tests are updated to check the new behavior.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P3
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch

This should be mentioned together with the feature of bug 1998704 in the Firefox 147 dev release notes.

Sebastian

QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: