JSFiddle - React, Tailwind, and code Playground
HTML
<div id="menu"></div>
CSS
#menu{
font-size: 12px;
width: 20em;
}
JavaScript
var div1 = document.createElement('div'),
css = getMatchedCSSRules(document.getElementById('menu'));
console.log(css); //works but dont' konw how to access width
div1.style.width = window.innerWidth - <!-- menu width -->;