Inactive CSS warning not updated when mutating the DOM in the Markup view
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
People
(Reporter: adriandecita, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
367.70 KB,
video/x-matroska
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
- Open DOM and style inspector
- Find and element with CSS rule that is not working for any reasons (I used flex rules) and select it. So inspector draws broken rule in grey colors meaning it is not active + adds a hint why it is so.
- In inspector view, grab the selected element it drag it in to a flex-container (any element with applied 'display: flex')
Actual results:
Greyed out rule remains the same, despite the fact it is working now
Expected results:
Inspector should update rules hinting once changes in DOM tree affect these rules. At least when these changes are caused by legit inspector functionality
Comment 1•6 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•6 years ago
|
||
Thanks for filing the issue, Adrian!
Indeed, the inactive CSS warning does not get removed when mutating the DOM such that the conditions are met.
For quick testing, I created a small sample.
Steps to reproduce:
- Run the following in a new tab:
data:text/html,<style>.flex-container {display: flex} .flex-item {align-self: stretch}</style><div class="flex-container"><span>flex container</span></div><div class="flex-item">flex item</div>
- Open DevTools > Inspector
- Inspect
<div class="flex-item"> - In the Rules panel, notice
align-self: stretchis marked inactive because the element is not a flex item or grid item - In the Markup panel, expand
<div class="flex-container"> - Drag and drop
<div class="flex-item">so it becomes a child of<div class="flex-container"> - Observe the Rules panel
Expected result:
No Inactive CSS warning because the element now satisfies the condition
Actual result:
Inactive CSS warning is still shown
Workaround:
Click on a different node, then back on <div class="flex-item"> to see the updated styles.
Updated•6 years ago
|
Description
•