Inspector doesn't understand CSS wide-keywords in the inherited rules panel
Categories
(DevTools :: Inspector, defect)
Tracking
(Not tracked)
People
(Reporter: emilio, Unassigned)
Details
In the following document:
<style>
parent { color: blue }
child { color: inherit }
</style>
<parent>
<child>Which color</child>
</parent>
When you inspect <child>, the color: blue is striked out. I personally think this behavior is reasonable, but it seemed to cause some confusion in bug 1215878 comment 44.
I haven't checked what other browsers do.
| Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Sorry, my bad. Now that I understand this better it does make sense.
If you do parent { color: blue !important } it will override the inherit value (as it would override unset and revert values). In that case inherit value would be struck through.
Would be nice to have a computed value near inherit, but is not a bug.
| Reporter | ||
Comment 2•6 years ago
|
||
If you do parent { color: blue !important } it will override the inherit value (as it would override unset and revert values). In that case inherit value would be struck through.
No it won't. It doesn't matter how !important the value on the parent is. The child will only get if if it inherits it by using inherit or revert or unset. But any other rule on the child would override the color.
Comment 3•6 years ago
|
||
Yeah, sorry I meant child, not parent. It's late on my side of the Earth :-)
child { color: blue !important }
child { color: revert }
In this case color: revert will be struck through which makes sense (because of specificity).
The confusion was only from the fact that I thought revert is something more then just a value.
| Reporter | ||
Comment 4•6 years ago
|
||
Alright, if you say the current behavior works for you, then it works for me as well. No need to be sorry btw :-)
Description
•