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): icons not centered inside tab #26053

Merged
merged 1 commit into from Dec 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/material/tabs/_tabs-common.scss
Expand Up @@ -51,6 +51,12 @@ $mat-tab-animation-duration: 500ms !default;
pointer-events: none;
}

// We support projecting icons into the tab. These styles ensure that they're centered.
.mdc-tab__text-label {
display: inline-flex;
align-items: center;
}

// Required for `fitInkBarToContent` to work. This used to be included with MDC's `without-ripple`
// mixin, but that no longer appears to be the case with `static-styles`. Since the latter is
// ~10kb smaller, we include this one extra style ourselves.
Expand Down