JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/less.js/2.3.1/less.min.js"></script>
<div id="some"></div>
CSS
#some{
background: #fff;
color: #000;
font: 8pt monospace;
height: 100%;
width: 100%;
white-space: pre-wrap;
}
JavaScript
var code = "";
code += "@sizeTablet: 1024px;";
code += "@sizeMobile: 600px;";
code += "@sizeMobileMinWidth: @sizeMobile + 1px;";
code += "@media screen and (min-width: @sizeMobileMinWidth) and (max-width: @sizeTablet){";
code += ".here{";
code += "sizeMobile: @sizeMobile;";
code += "sizeMobileMinWidth: @sizeMobileMinWidth;";
code += "}";
code += "}";
less.render(code, {}, function(e, o){
document.getElementById("some").innerHTML = ((e?e.message:'') + (o?o.css:''));
});