JSFiddle - React, Tailwind, and code Playground
HTML
<div class="ful">
<h1>title</h1>
<p>Lorem ipsum conetnt</p>
</div>
CSS
body {
font-size: 10px;
}
h1 {
font-size: 2em;
}
p {
font-size: 1.2em;
}
JavaScript
window.onresize = function(){
if($(window).width() > 1024)
$('body').css('font-size', $(window).width() / 120 );
else
$('body').css('font-size', $(window).width() / 36 );
}
window.onresize();