Closed Bug 1552949 Opened 6 years ago Closed 6 years ago

Inspector doesn't understand CSS wide-keywords in the inherited rules panel

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

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.

Summary: Inspector doesn't understand CSS wide-keywords → Inspector doesn't understand CSS wide-keywords in the inherited rules panel

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.

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.

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.

Alright, if you say the current behavior works for you, then it works for me as well. No need to be sorry btw :-)

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.