html – Paper-tabs width to fit content

Question:

Polymer version: 1.1.0

Source:

<body class="fullbleed vertical layout">
    <paper-toolbar>
        <div class="title">CodeStock</div>
        <paper-tabs>
            <paper-tab>Почему мы?</paper-tab>
            <paper-tab>Еще текст</paper-tab>
            <paper-tab>Длинный текст!!!</paper-tab>
            <paper-tab>Контакты</paper-tab>
        </paper-tabs> 
    </paper-toolbar>
</body>

What happens:

IE / Edge doesn't display radio buttons at all since no paper-tabs or paper-tab widths are specified. Chrome / Firefox / Safari displays and everything works, but the size of the radio button is fixed (default 100×50).

What I want to achieve:

The width of the paper-tab must match the width of the text inside + small padding. That is, the width of the paper-tab labeled 'Long text !!!' should be larger than the paper-tab labeled Контакты . In this case, it is necessary that it would be displayed correctly in all browsers.

Question:

How do I force the paper-tab be NOT a fixed size? So that the width of the paper-tab is equal to the width of the text inside it.

Answer:

Scrollable : If true, tabs are scrollable and the tab width is based on the label width.
Found it here: https://stackoverflow.com/questions/28197910/variable-width-for-polymer-paper-tabs

Scroll to Top