Skip to content

Commit

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

Relates to angular#26024 (comment).
  • Loading branch information
crisbeto authored and wagnermaciel committed Dec 9, 2022
1 parent 092cb50 commit f99a8ab
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 f99a8ab

Please sign in to comment.