JSFiddle - React, Tailwind, and code Playground

HTML

<div class="col" data-css-functions="width:250px;height:30px">Col 1</div>
<div class="col" data-css-functions="width:250px;height:30px">Col 2</div>
<div class="col" data-css-functions="width:300px;height:80px">Col 3</div>
<div class="col" data-css-functions="width:200px;height:80px">Col 4</div>

CSS

.col {
    display:block;
    position:relative;
    margin: 2px;
    float:left;
    background:#454545;
    color:#FFF;
}

JavaScript

$('[data-css-functions]').each(function(index, el){
    $el = $(el);
    
    var css = $el.data('css-functions').split(';');
    for(i in css)
        $el.css( css[i].split(':')[0], css[i].split(':')[1]);
    
});