JSFiddle - React, Tailwind, and code Playground

HTML

<p id="output"></p>
<div id="styled"><p>hello</p></div>

CSS

#styled {
   position: absolute;
   top: 200px;  
   padding: 10px 40px;
   border: solid 1px black;
   border-width: 2px;
}

JavaScript

var element = document.getElementById('styled'),
    style = window.getComputedStyle(element),
    output = document.getElementById('output');

output.innerHTML += 'top: ' + style.getPropertyValue('top');
output.innerHTML += '<br>color: ' + style.getPropertyValue('color');
output.innerHTML += '<br>border: ' + style.getPropertyValue('border');
output.innerHTML += '<br>border-width: ' + style.getPropertyValue('border-width');
output.innerHTML += '<br>border-top-width: ' + style.getPropertyValue('border-top-width');
output.innerHTML += '<br>padding: ' + style.getPropertyValue('padding');
output.innerHTML += '<br>padding-left: ' + style.getPropertyValue('padding-left');
output.innerHTML += '<br>height: ' + style.getPropertyValue('height');
output.innerHTML += '<br>background-position: ' + style.getPropertyValue('background-position');