title: Center element within button on both axis using Flexbox
body: <p>I am trying to use Flexbox to center an element on both axis inside of a button element. The code works just fine on Chrome but fails to center the element in Firefox and Safari. When I convert the button to a div the element will center as expected, however due to accessibility reasons this is not a feasible solution for me.</p>
  
  <p>The only thing I can think of that is causing this problem is either a bug in the browser or some CSS property that is being set by the user-agent stylesheet that I am not aware of.</p>
  
  <p><strong>Expected result:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/HjWOk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HjWOk.png" alt="Expected result"></a></p>
  
  <p><strong>Actual result:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/DiNwW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DiNwW.png" alt="Actual result"></a></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>button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    background-color: blue;
  }
  
  .square {
    width: 32px;
    height: 32px;
    background-color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button type="button"&gt;
    &lt;div class="square"&gt;&lt;/div&gt;
  &lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>