JSFiddle - React, Tailwind, and code Playground

HTML

<div id="q">
    boo
</div>

CSS

div#q {
    background-color: red;
}

JavaScript

alert(window.getComputedStyle(document.getElementById('q'),null).getPropertyValue('background-color'));