Skip to content

Commit

Permalink
fix(material/tabs): icons not centered inside tab (#26053)
Browse files Browse the repository at this point in the history
Fixes that icons projected into a tab were centered anymore.

Relates to #26024 (comment).

(cherry picked from commit 7b98f1a)
  • Loading branch information
crisbeto committed Dec 7, 2022
1 parent a526ede commit 3bb07ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/material/tabs/_tabs-common.scss
Expand Up @@ -53,6 +53,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

0 comments on commit 3bb07ae

Please sign in to comment.