JSFiddle - React, Tailwind, and code Playground
HTML
<div id="size"></div>
<button type="button">Toggle</button>
<br>Press toggle again before the div finishes hiding and the paddings will be added its width and height; regression from 1.8.3
<div id="foo"></div>
CSS
#foo {
height:60px;
width:60px;
padding:40px;
background:yellow;
}
JavaScript
var $div = $('#foo');
$('button').click(function() {
$div.stop().toggle(600);
});
var $size = $('#size');
setInterval(function() {
$size.html('$div.width(): ' + $div.width() + '<br>' +
'.css("width"): ' + $div.css('width') + '<br>' +
'.css("paddingLeft"): ' + $div.css('paddingLeft')
);
}, 100);