blob: 131b7ea324cdb95693d383aae69cc428f997c859 [file] [log] [blame]
<html>
<head>
<style>
div { background: purple; margin: 1em; color: white; font: 24px 'Lucida Grande'; }
</style>
</head>
<body>
Note that background and font are both buggy right now!
<div id="foo">Test</div>
<script>
var ruleList = document.defaultView.getMatchedCSSRules(document.getElementById('foo'), '');
var decl = ruleList[0].style;
for (var i = 0; i < decl.length; i++) {
var shorthand = decl.getPropertyShorthand(decl[i]);
document.write(decl[i] + ": " + decl.getPropertyValue(decl[i]));
if (shorthand) {
document.write(" (original property was " + shorthand
+ (decl.isPropertyImplicit(decl[i]) ? " and property was implicitly set.)" : ")"));
}
document.write( "<br>");
}
</script>
</body>
</html>