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

Paper-tabs in Flexbox #29

Closed
tjsavage opened this issue Jun 5, 2015 · 5 comments
Closed

Paper-tabs in Flexbox #29

tjsavage opened this issue Jun 5, 2015 · 5 comments

Comments

@tjsavage
Copy link
Contributor

tjsavage commented Jun 5, 2015

When using paper-tabs (Polymer 1.0) inside a flexbox without a specific width, they disappear in IE (10 as well as 11).

<div class="horizontal layout center">

  <div class="flex">This is flex</div>

  <paper-tabs>
    <paper-tab>Paper</paper-tab>
    <paper-tab>Tabs</paper-tab>
  </paper-tabs>

</div>

Any solution as I guess I should be able to use it this way (I'm very new to Polymer).

@robrez
Copy link
Contributor

robrez commented Jun 22, 2015

+1 - I tested my app in IE11 today and saw this issue.

I made a couple of observations:

  • Adding a "flex" attribute on the tabs themselves will cause them to be sized. Some folks may be alright with adding flex[1-12] on the paper-tabs element and compromising "make tabs as small as possible" for "make tabs use 1/3 of the space".
  • I'm guessing that IE uses a different value for flex-basis than other browsers. The following classes can be used to achieve the desired behavior:
    paper-tabs::shadow #tabsContainer {
      flex-basis: auto !important;
    }
    paper-tabs::shadow #tabsContent {
      flex-basis: auto !important;
    }
    paper-tab {
      flex-basis: auto !important;
    }

I'm not sure if

  • we're hitting a general IE problem that can be safely fixed in one of iron-flex-layout's classes
  • the problem can be safely resolved by changing some css in paper-tabs
  • some combination of the above
  • none of the above - IE users are shunned.

@robrez
Copy link
Contributor

robrez commented Aug 14, 2015

I found this PR that has made the changes I noted, above, to address flex-basis problems in IE.

PolymerElements/iron-flex-layout#9

It looks like the issues are not limited to paper-tabs

Edit: Everything works well after applying the changes from that PR except that I still need to apply flex-basis: auto; to the paper-tab.

paper-tab.html applies --layout-flex to :host...

    --layout-flex: {
      -ms-flex: 1 1 0.000000001px;
      -webkit-flex: 1;
      flex: 1;
      -webkit-flex-basis: 0.000000001px;
      flex-basis: 0.000000001px;
    };

... and --layout-flex uses flex-basis: tiny;

@notwaldorf
Copy link
Contributor

This looks like it may have been fixed in a recent PR. Please re-open if it's still an issue!

@kevinpschaaf
Copy link
Contributor

@robrez
Copy link
Contributor

robrez commented Jan 27, 2016

Rebased my PR #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants