as we know that with window.getComputedStyle() method we can get the computed styles of specific element. (see https://jsfiddle.net/r7sgpyt5/1/). My question is,how can we know where the CSSStyleDeclaration in the computed style come from.for example in https://jsfiddle.net/r7sgpyt5/1/ I have define a css rule like:
#element{
color:red;
border:1px solid #999;
margin:10px;
}
if I use getComputedStyle(element,null).getPropertyValue("color") it returns "rgb(255, 0, 0)",but how can I know the property "color" is defined in the css selector "#element".
Thx!