title: Flex items not stacking properly in Safari
body: <p>I've made a flex layout in which four columns/boxes sit side-by-side within a parent div. I've added a media query at 980px that increases the width of the columns and adds a flex-wrap to push the two right hand columns onto a new row, creating a 2 x 2 style layout. This works in every browser except Safari, in which the results are very unpredictable.</p>
  
  <p>Fiddle: <a href="https://jsfiddle.net/gjy1t16p/6/" rel="noreferrer">https://jsfiddle.net/gjy1t16p/6/</a></p>
  
  <p>If you view this in Chrome and drag the window below 980px, it will work in the way I've described above. In Safari however, although I've not managed to recreate the problem exactly, the boxes stack vertically instead.</p>
  
  <p>As I mentioned, the results are unpredictable – when implemented on my website, the layout is actually closer to working than in the Fiddle I've made. On the website, the 2 x 2 layout works, but only if the fourth box has no text / widgets inside it. Once it contains content that reaches the full width of the box, it moves down to the left and sits underneath the third box, as happened to any other boxes I tried adding after it.</p>
  
  <p>If anyone has experienced this bug before and knows how to solve it, I'd be really grateful. I've spent all day trying to fix it and I'm completely out of ideas.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;footer class="footer"&gt;
  
  &lt;div class="footer-container"&gt;
  
  &lt;div class="footer-column" id="column-1"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
  &lt;/div&gt;
  
  &lt;div class="footer-column" id="column-2"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
  &lt;/div&gt;
  
  &lt;div class="footer-column" id="column-3"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
  &lt;/div&gt;
  
  &lt;div class="footer-column" id="column-4"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
  &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;/footer&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.footer {  
      height: auto;
      width: 100%;        
      background-color: #efefef;
      display:-webkit-box;
      display:-webkit-flex;
      display:-ms-flexbox;
          display:flex;
      -webkit-box-orient: vertical;
      -webkit-box-direction: normal;
      -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
      -webkit-box-align: center;
      -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  }
  
  .footer-container {
      width:85%;
      height:inherit;
      margin-top:60px;
      overflow:hidden;
      display:-webkit-box;        
      display:-webkit-flex;       
      display:-ms-flexbox;        
          display:flex;       
      -webkit-box-pack: justify;
      -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  }
  
  .footer-column { 
      min-width:20%;
      max-width:20%;
      margin-bottom:40px;
  }
  
  #column-1 {background-color:red}
  #column-2 {background-color:yellow}
  #column-3 {background-color:blue}
  #column-4 {background-color:green}
  
  @media only screen 
  and (min-width : 0px) 
  and (max-width : 980px) {
  
  .footer-container {
      -webkit-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
          flex-wrap: wrap;
      -webkit-box-orient: horizontal;   
      -webkit-box-direction: normal;   
      -webkit-flex-direction: row;   
      -ms-flex-direction: row;   
          flex-direction: row;
  
  }
  
  .footer-column {
      margin-bottom:50px;
      min-width:45% !important;
      max-width:45% !important;
  }
  
  }
  </code></pre>