title: Buttons with zero width still affect parent's width in Safari
body: <p>I'm trying to change the width of some <code>button</code>s based on hover state. That is, they should have width 0 initially and automatic width on hover.</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>.parent {
    float: left;
    border: 2px solid darkblue;
  }
  
  .child {
    float: left;
    width: 0px;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
  }
  
  .parent:hover .child {
    width: auto;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="parent"&gt;
    &lt;button class="child"&gt;a&lt;/button&gt;
    &lt;button class="child"&gt;b&lt;/button&gt;
    &lt;button class="child"&gt;c&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/4rsd84yg/9/" rel="nofollow noreferrer"><strong>JSFiddle</strong></a></p>
  
  <p>This works as expected on most browsers (screenshot from Firefox):</p>
  
  <p><a href="https://i.stack.imgur.com/CfZBz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CfZBz.png" alt="Non-hovered in Firefox"></a></p>
  
  <p>However, Safari seems to still consider the (zero-width, invisible) buttons width for calculation of the parent's width:</p>
  
  <p><a href="https://i.stack.imgur.com/pOBeR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pOBeR.png" alt="Non-hovered in Safari"></a></p>
  
  <p>Is there a reason for Safari's unusual rendering I'm missing or might it just be a bug?</p>