Skip to content

Commit

Permalink
feat(tabs): support stretched tabs in mat-tab-nav-bar
Browse files Browse the repository at this point in the history
Adds support for stretched tabs in the tab nav bar. Also removes a duplicate selector.

Fixes #8871.
  • Loading branch information
crisbeto authored and mmalerba committed Mar 15, 2018
1 parent c490ac1 commit f73387c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib/tabs/tab-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
}
}

.mat-tab-group[mat-stretch-tabs] .mat-tab-label,
.mat-tab-group[mat-stretch-tabs] .mat-tab-label {
flex-basis: 0;
flex-grow: 1;
Expand Down
7 changes: 7 additions & 0 deletions src/lib/tabs/tab-nav-bar/tab-nav-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

.mat-tab-links {
position: relative;
display: flex;
}

// Wraps each link in the header
Expand All @@ -17,8 +18,14 @@
text-decoration: none; // Removes anchor underline styling
position: relative;
overflow: hidden; // Keeps the ripple from extending outside the element bounds

[mat-stretch-tabs] & {
flex-basis: 0;
flex-grow: 1;
}
}


@media ($mat-xsmall) {
.mat-tab-link {
min-width: 72px;
Expand Down

0 comments on commit f73387c

Please sign in to comment.