Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

paper-tab link layout not working as expected #67

@silkentrance

Description

@silkentrance

Using the following with Polymer 1.0.x, I find that the links will not be centered both vertically and horizontally as one would expect

<paper-tabs id="tabs">
<paper-tab link class="horizontal center-center layout"><a href="#one">One</a></paper-tab>
<paper-tab link class="horizontal center-center layout"><a href="#two">Two</a></paper-tab>
<paper-tab link class="horizontal center-center layout"><a href="#three">Three</a></paper-tab>
<paper-tab link class="horizontal center-center layout"><a href="#four">Four</a></paper-tab>
</paper-tabs>

(taken from the provided example, of course)

When inspecting the anchor element, I find that within paper-tab.html you specify that the height of the link must be 100%. Removing/Overriding that I managed to at least make it center vertically. However, it will not center horizontally unless you also add a text-align: center style to the stylesheet, e.g.

.tab-content.paper-tab > a {
  -ms-flex: 1 1 0.000000001px;
  -webkit-flex: 1;
  flex: 1;
  -webkit-flex-basis: 0.000000001px;
  flex-basis: 0.000000001px;
  text-align: center;
  text-decoration: none;
}

Removing the height property and adding text-align as depicted above will properly align the anchor.
Optionally, you might want to add text-decoration: none to make this identical to a non link paper-tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions