Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/tabs): prevent tab header from collapsing when empty inside a drop list #29418

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/material/tabs/_tabs-common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,20 @@ $mat-tab-animation-duration: 500ms !default;
[mat-align-tabs='end'] > #{$parent} & {
justify-content: flex-end;
}

// Prevent the header from collapsing when it is a drop list. This is useful,
// because its height may become zero once all the tabs are dragged out.
// Note that ideally we would do this by default, rather than only in a drop
// list, but it ended up being hugely breaking internally.
.cdk-drop-list &,
&.cdk-drop-list {
@include token-utils.use-tokens(
tokens-mdc-secondary-navigation-tab.$prefix,
tokens-mdc-secondary-navigation-tab.get-token-slots()
) {
@include token-utils.create-token-slot(min-height, container-height);
}
}
}

// Structural styles for the element that wraps the paginated container's content.
Expand Down
Loading