question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mat-stretch-tabs not working

See original GitHub issue

Bug, feature request, or proposal:

mat-stretch-tabs has no effect

Desktop mode capture d ecran 2017-06-21 a 22 48 21

“Mobile” mode (with or without mat-stretch-tabs) capture d ecran 2017-06-21 a 22 48 43

What are the steps to reproduce?

<md-tab-group mat-stretch-tabs>
        <md-tab label="Infos"></md-tab>
        <md-tab label="Paiement"></md-tab>
        <md-tab label="Webradio"></md-tab>
</md-tab-group>

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.2.3 Material 2.0.0-beta.7 All browser

Try to alter directly min-width in css but has no effect too. Help please this going me crazy 😕

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
vesrahcommented, May 8, 2018

I agree that disabling ViewEncapsulation is a terrible idea. If you want to fill the tab bar area and evenly distribute the tabs then this should work:

/deep/ .mat-tab-list {
  .mat-tab-label {
    flex-basis: 0;
    flex-grow: 1
  }
1reaction
codegastudiocommented, Jun 28, 2017

Ok so i found this solution

.mat-tab-list {
  div[role^='tab'] {
    min-width: 72px;
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Make tab labels stretch to full width in material design for ...
Show activity on this post. I would like to get tabs to stretch to the full width of their parent div. Anyone know...
Read more >
Mat Stretch Tabs So - StackBlitz
This Stackblitz showcases how to stretch Angular Material tabs to fit the document's width by using the mat-stretch-tabs attribute.
Read more >
Tabs - Angular Material
Angular Material tabs organize content into separate views where only one view can be visible at a time. Each tab's label is shown...
Read more >
Angular Material - Tabs - Tutorialspoint
Attribute to indicate position of tab buttons: bottom or top; default is top. 5. md-stretch-tabs. Attribute to indicate whether or not to stretch...
Read more >
Tab Component - Codeible
Hello, in this tutorial, I will be talking about the Tab component for ... To do this, apply the mat-stretch-tabs attribute to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found