If you click F12 in a page in Google Chrome, you'll see the developer's console. The next tab that appears (right to "Styles") is "Computed". If you open that tab up, you'll see what are the proprieties of a certain element that you have selected from left pane. My question is how can I check which of these properties were inherited ("Show inherited")? I tried the following script but it failed:
var ssheets = document.styleSheets,
ssheets_length = document.styleSheets.length;
for(var k = 0; k < ssheets_length; k++){
var rules = ssheets[2].cssRules;
for(var i = 0; i < rules.length; i++) {
if (catched_element.is(rules[i].selectorText)) {
final_array.push(rules[i]);
}
}
}
This is what I tried to find within the rules, if the element wasn't inherited. If the rule is inherited, it would be carried into an array that's showing only the elements that appear in the computed tab if you don't check "Show Inherited". Any ideas on this one?