JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container active">
</div>

CSS

.all-transition {
    -webkit-transition: all 1s ease;
    -moz-transition: all 1s ease;
    -o-transition: all 1s ease;
    transition: all 1s ease;
    }

.container {
    width: 200px;
    height: 15px;
    background-color: #ffd112;
}

.container.active {
    height: 200px;
}

JavaScript

// Remove active class, i.e. make container smaller.
var container = $('.container').removeClass('active');

var foo = container[0].offsetWidth;

// Activate transition upon property change, but don't change properties.
container.addClass('all-transition');

// Why am I seeing an animation? Isn't the order of the above commands considered?