Skip to content

Commit 28a7bb4

Browse files
committed
fix(material/tabs): prevent header from collapsing if there are no tabs
Fixes that the tab header was collapsing when it doesn't have any tabs which can be problematic when implementing drag&drop in it.
1 parent 6659d8f commit 28a7bb4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/material/tabs/_tabs-common.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,15 @@ $mat-tab-animation-duration: 500ms !default;
383383
display: flex;
384384
flex: 1 0 auto;
385385

386+
@include token-utils.use-tokens(
387+
tokens-mdc-secondary-navigation-tab.$prefix,
388+
tokens-mdc-secondary-navigation-tab.get-token-slots()
389+
) {
390+
// Prevents the container from collapsing if there are no tabs
391+
// which can be problematic for tab headers that use drag&drop.
392+
@include token-utils.create-token-slot(min-height, container-height);
393+
}
394+
386395
// We need to set the parent here explicitly, in order to prevent the alignment
387396
// from any parent tab groups from propagating down to the children when nesting.
388397
// Note that these are used as inputs so they shouldn't be changed to `mat-mdc-`.

0 commit comments

Comments
 (0)