title: Bootstrap 4 & flex and collapsible content on full-height page
body: <p>I am trying to have a collapsible <code>div</code> (fixed height) on a full-height page with flex and bootstrap 4 (same issue with bootstrap 3).</p>
  
  <p>The current snippet works great on Firefox but it does not work on Chrome-based browsers: the initial size of the <code>collapsable</code> is correct (<code>100px</code>), but once you collapse it, it does not resize properly (<code>0px</code> if subresizable's height is <code>100%</code>, or proportional to the available space).</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-css lang-css prettyprint-override"><code>html, body {
    height:100%;
    width: 100%;
  }
  
  body {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
  
    flex-flow: column;
  }
  
  #collapsable {
    height: 100px;
    background-color: green;
  }
  
  #subresizable {
    height: 100%;
    width: 100%;
    background-color: pink;
  }
  
  #resizable {
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
  
    background-color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/header&gt;
  &lt;body&gt;
  
    &lt;div id="resizable"&gt;
      &lt;div id="subresizable"&gt;
        &lt;button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapsable" aria-expanded="false" aria-controls="collapsable"&gt;COLLAPSE&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="collapsable" class="collapse in"&gt;&lt;/div&gt;
  
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>