Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Need a way to specify tab alignment. #102

Open
bicknellr opened this issue Nov 30, 2015 · 6 comments
Open

Need a way to specify tab alignment. #102

bicknellr opened this issue Nov 30, 2015 · 6 comments

Comments

@bicknellr
Copy link
Contributor

There's currently no way to center tabs.

@KyleHorkley
Copy link

There is a hack that I use. Use this CSS to center the tabs:

.paper-tabs-0 #tabsContainer.paper-tabs {
-webkit-flex: 0;
flex: 0;
-webkit-flex-basis: auto;
flex-basis: auto;
margin: 0 auto;
width: auto;
}

#tabsContent.scrollable.paper-tabs {
position: relative;
}

@ebidel
Copy link
Contributor

ebidel commented Nov 30, 2015

@KyleHorkley FYI, that's not going to work under native shadow.

@bicknellr
Copy link
Contributor Author

@KyleHorkley Glad you noticed this! Your post in the Polymer Google+ page is actually why I filed the issue.

@KyleHorkley
Copy link

@ebidel Yeah, but it's a nice workaround for now.

@KyleHorkley
Copy link

@bicknellr @ebidel Found a better way to accomplish this (and it should work in native shadow!). Simply add a div before and after paper-tabs with the class of flex. Credit to Matt Bogado on G+

@kpprogrammer
Copy link

Adding flex class in a wrapper div did not help. The only way I could get the tabs to center was to change position:absolute in #tabContents to position:static. Since this style can't be overwritten due to shadow, can a property such as @apply(--paper-tabs-content) please be added to the #tabsContent and#tabsContent.scrollable styles in paper-tabs.html?

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

No branches or pull requests

4 participants