What does it mean when Chrome Dev Tools shows a computed property greyed out

CssGoogle ChromeGoogle Chrome-Devtools

Css Problem Overview

Please note, not the Styles panel (I know what greyed-out means in that context—not applied), but the next panel over, the Computed properties panel.

What does it mean when a Computed property is shown greyed out?


enter image description here

Css Solutions

Solution 1 - Css

NB: This answer has no solid evidence, it's based on my observations along the time.

The gray calculated properties are neither default, nor inherited. This only occurs on properties that were not defined for the element, but calculated from either its children or parent based on runtime layout rendering.

Take this simple page as an example, display is default and font-size is inherited:

  div { font-size: 13px; }

enter image description here

In this particular example, height is calculated from <p>'s children - text node (font size plus line height), width is calculated from its parent - <div>'s width, which is also calculated from its parent <body>.

EDIT: Well I thought again, here's my opinion based answer. I should really go and take a look at Chromium source code later :D

By expanding those arrows, you could see which actual rule is applied to the element, among all those defined against it (either directly or inherited, either by developer or browser):

enter image description here

Here you can trace down to every definition even including browser built-in rules, and check with the CSS cascading (overriding) mechanism.

So, for those elements that have no CSS definition (no directly defined, no inherited, no browser built-in), you don't have any source to trace. And the property values are totally runtime calculated.

If you check Show all, more grayed properties are shown. These are not defined anywhere either. But unlike those in previous screenshots, these are not runtime calculated - they are CSS spec default value.

enter image description here


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAmbroseChapelView Question on Stackoverflow
Solution 1 - CssLeoView Answer on Stackoverflow