inherited rules are marked as stricken in the css inspector
Reported by
mqu...@gmail.com,
Mar 27 2018
|
||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Steps to reproduce the problem:
Load a document with the following HTML:
```
<html>
<head>
<style>
html {
font-family: Courier New;
}
div {
font-family: Comic Sans MS;
}
div.special {
font-family: inherit;
}
</style>
</head>
<body>
<div>
test1
</div>
<div class="special">
test2
</div>
</body>
</html>
```
then open the DOM element inspector, select the "test2" text, and look at the css styles/rules tab (not the computed rules)
What is the expected behavior?
Given that the rule "font-family: Courier New" has meaning and its contents affect the appearance of the selected node, it should not appear with a strikethrough.
What went wrong?
The rule "font-family: Courier New" appears with a strikethrough, as Chrome presumes that since a rule with higher precedence has been found that the contents of this rule are completely specious and can be ignored.
However, the contents of this rule ARE important and should definitely not be stricken.
Did this work before? No
Chrome version: 65 Channel: stable
OS Version: 10.0
Flash Version:
The important point here is that the rule "font-family: Courier New" HAS MEANING to the div.special node. For it to appear stricken through implies that this rule is deactivated.
Here's a common example: you open the CSS inspector to see which rule is providing the styling for a node. Which rules do you look at, the stricken ones or the regular text ones? You won't find an "enabled" rule in the CSS inspector with "font-family: Courier New" because Chromium is marking it the same way it marks rules that have absolutely zero effect on the node in question.
,
Dec 19
DevTools bug triage: closing low-priority bugs that don't have much demand. |
||
►
Sign in to add a comment |
||
Comment 1 by kozyatinskiy@chromium.org
, Mar 27 2018Status: Assigned (was: Unconfirmed)