JSFiddle - React, Tailwind, and code Playground

HTML

<div class="frame">
    <p>some text some text some text some text asdads</p>
</div>

CSS

.frame { width:120px; display:none}

JavaScript

var p = $('.frame p').clone().css('display', 'none');
$('body').append(p);
alert(p.height()); // 19
p.remove();