title: Toggling class doesn't trigger transition
body: <p>I am trying to trigger a transition by toggling a class. The class toggles and applies it's style to the element, but the transition does not trigger. The transition applies to all properties, so I don't think that that is the problem.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function expandFunction(element) {
    element.classList.toggle("setHeightStyle");
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.setHeightStyle {
    height: 60px;
  }
  
  #expSect1 {
    overflow: hidden;
    cursor: pointer;
    transition: 1s;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="setHeightStyle" id="expSect1" onclick="expandFunction(this)"&gt;
    &lt;h1&gt;Title&lt;/h1&gt;
    &lt;br&gt;
    &lt;p&gt;Content!&lt;br&gt;More content!&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>