Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-flexbox] flex layout support for <button> #730

Closed
jonkoops opened this issue Nov 17, 2016 · 6 comments
Closed

[css-flexbox] flex layout support for <button> #730

jonkoops opened this issue Nov 17, 2016 · 6 comments

Comments

@jonkoops
Copy link

I've been running into an interop issue between browsers when it comes to using flexbox in combination with the button element. According to the specification the display property "Applies to: all elements". But it looks like some browsers are not adhering to this due to inconsistencies in their implementation of the button element.

Test case:

<style>
  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;
  }
</style>
<button type="button">
  <div class="square"></div>
</button>

Expected result:

expected

Test results:

Browser Result Pass Bug tracker link
Chrome 54 chrome 👍 #262679 (fixed)
Safari 10.0.1 safari 👎 #148826
Firefox 50 firefox 👎 #984869, #1230207 (fixed)
Edge 38 edge 👍 Not available
IE 11 ie 👍 Not available

Some of the links are about the fieldset element, but still contain useful information.

Related links:

@karlcow
Copy link
Member

karlcow commented Nov 30, 2016

  • Working in Firefox Nightly 53.0a1 (2016-11-29) (64-bit). 👍
  • Working in Firefox Dev Edition 52.0a2 (2016-11-22) (64-bit) 👍
  • not working in Safari Developer Preview Release 18 (Safari 10.1, WebKit 12603.1.12)
    ping @jonathandavis https://twitter.com/jonathandavis

http://codepen.io/webcompat/pen/xRPZBy

@karlcow
Copy link
Member

karlcow commented Nov 30, 2016

@MatsPalmgren
Copy link

FYI, Firefox 52 and later supports grid, flexbox and multi-column layout inside <button>.
Implemented here:
https://bugzilla.mozilla.org/show_bug.cgi?id=984869

@jonkoops
Copy link
Author

jonkoops commented Dec 23, 2016

That's great. Now we just need the Safari team on board and this should no longer be a problem in any major browser.

@jdatapple
Copy link

jdatapple commented Jan 9, 2017

I've noted this with the WebKit team. Looks like this issue: https://bugs.webkit.org/show_bug.cgi?id=148872

@fantasai
Copy link
Collaborator

Closing, as this is an implementation bug not a spec bug. :)

@fantasai fantasai changed the title [css-display-3] flex layout support for <button> [css-flexbox] flex layout support for <button> Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants