JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">Test</div>
JavaScript
HTMLElement.prototype.css = function(props) {
var element = this;
props = props || {};
for(var i in props) {
var name = i;
var value = props[i];
element.style[name] = value;
}
};
var test = document.getElementById('test');
test.css({
width: '150px',
height: '150px',
background: '#ccc',
padding: '10px',
margin: '20px auto',
border: '5px solid #999'
});