I want to get the final css property applied to a dom node, but not the calculated value. I know that getComputedStyle
can get a computed value, but this isn't what I want. Here's an example:
<body>
<div id='x' class="a b">x</div>
</body>
<style>
.a {
height: auto;
}
.b {
height: 35%;
}
</style>
I want to be able to find that '35%' value for my x div, not the pixel height. How can I do this in javascript? Is there an easy way or do you have to traverse the classes and stylesheets yourself?