JSFiddle - React, Tailwind, and code Playground
HTML
<div class="brick small"></div>
CSS
.brick
{
background: red;
position: absolute;
transition: all 0.4s ease-in-out;
}
.large
{
width: 200px;
height: 200px;
}
.small
{
width: 400px;
height: 400px;
}
JavaScript
$('.brick').removeClass('small').addClass('large');
var brick = $('<div />', {'class':'brick large', style:'transition:none; left: 9999px;'}).appendTo('body');
var h = brick.height()
var w = brick.width();
console.log(h)
console.log(w)