Closed Bug 961032 Opened 10 years ago Closed 10 years ago

[Inspector] Show which CSS selector matches ::before and ::after elements

Categories

(DevTools :: Inspector, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: bgrins)

References

Details

STR:
* have a CSS rule with a compount selector (2 or more selectors separated with a comma)
* have an element matched by one of these selectors
* select this element in the inspector view

Expected:
* We see the CSS rules that applies to this element.
* We see which subselector matches this element.

Actual:
* We see the CSS rules that applies to this element.
* we don't know which subselector matches this element.

It would be a very useful addition for selectors with a lot of subselectors.

Maybe a easier "fix" could be to go to a new line when there is a comma in a selector ?
Note that the subselector that did match has a different color than the others.
Were you thinking of only showing that one subselector?
Oh, you're right, what I'm asking is working.

Except for pseudo elements ;) which was the case I was working on.
Summary: [Inspector] Show which CSS selector matches the selected element → [Inspector] Show which CSS selector matches the selected element for pseudo-elements too
(In reply to Julien Wajsberg [:julienw] (away May 8th) from comment #2)
> Oh, you're right, what I'm asking is working.
> 
> Except for pseudo elements ;) which was the case I was working on.

Once we have the :before and :after pseudo elements in the markup view (bug 920141), I believe this will work automatically.
Depends on: 920141
Should be working now that 920141 landed
Assignee: nobody → bgrinstead
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Summary: [Inspector] Show which CSS selector matches the selected element for pseudo-elements too → [Inspector] Show which CSS selector matches ::before and ::after elements
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.