JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container"><span>This is my text</span></div>

CSS

* {
    font-family:Myriad Pro;
}

#container {
    height:100px;
    width:98%;
    background-color:#eeeeee;
    padding:1%;
}

JavaScript

$(document).ready(function() {
    var fontSize = parseInt($("#container").height())+"px";
    alert(fontSize);
    $("#container span").css('font-size', fontSize);
});