Open
Bug 1865042
Opened 2 years ago
Add unmatched style to parent rule unmatched selectors for nested rules
Categories
(DevTools :: Inspector: Rules, enhancement, P3)
DevTools
Inspector: Rules
Tracking
(Not tracked)
NEW
People
(Reporter: nchevobbe, Unassigned)
References
(Blocks 1 open bug)
Details
Steps to reproduce
- Navigate to
data:text/html,<meta charset=utf8><style>body, doesnotexist { h1,doesnotexisteither { color: tomato; } }</style><h1>Hello - Open the inspector
- Select the
<h1>node
Actual results
The rule is the following:
body, doesnotexist {
h1, doesnotexisteither {
color: tomato;
}
}
In the rule actual selector, h1, doesnotexisteither, doesnotexisteither is marked as unmatched.
But in the parent rule selector, body, doesnotexist, doesnotexist is not marked as unmatched
This can be quite tricky as the parent selector can be used in nesting "after" the selector, or in ":not()", and there can be many nesting level
h1 {
body > & {}
:not(&) {
:not(&) {}
}
}
We can't just extract the parent selector, and try to see how the current selected element fits into it
You need to log in
before you can comment on or make changes to this bug.
Description
•