JSFiddle - React, Tailwind, and code Playground

by David Thomas

HTML

<div class="three">
    <p>Some arbitrary content.</p>
</div>

CSS

.three {
    height: 445px;
}

JavaScript

var elems = document.getElementsByClassName('three');
for (var i = 0, len = elems.length; i < len; i++){
    console.log(parseInt(window.getComputedStyle(elems[i], null).height, 10));
    if (parseInt(window.getComputedStyle(elems[i], null).height, 10) == 445) {
        elems[i].style.backgroundColor = 'red';
    }
}