Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
improvement(tabs): Fix tab bar indicator precedence issue & Icon size…
Browse files Browse the repository at this point in the history
… css properties are applied to icon

PiperOrigin-RevId: 482190989
  • Loading branch information
material-web-copybara authored and copybara-github committed Oct 20, 2022
1 parent ee40081 commit e66bc9f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
20 changes: 10 additions & 10 deletions packages/mdc-tab-bar/_tab-bar-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ $secondary-navigation-tab-light-theme: (
@include tab-theme.primary-navigation-tab-theme-styles(
map-ext.pick($theme, map.keys(tab-theme.$primary-light-theme)...)
);
}

.mdc-tab-indicator {
@include tab-indicator-theme.theme-styles(
map-ext.pick($theme, map.keys(tab-indicator-theme.$light-theme)...)
);
.mdc-tab-indicator {
@include tab-indicator-theme.theme-styles(
map-ext.pick($theme, map.keys(tab-indicator-theme.$light-theme)...)
);
}
}
}

Expand All @@ -155,11 +155,11 @@ $secondary-navigation-tab-light-theme: (
@include tab-theme.secondary-navigation-tab-theme-styles(
map-ext.pick($theme, map.keys(tab-theme.$secondary-light-theme)...)
);
}

.mdc-tab-indicator {
@include tab-indicator-theme.theme-styles(
map-ext.pick($theme, map.keys(tab-indicator-theme.$light-theme)...)
);
.mdc-tab-indicator {
@include tab-indicator-theme.theme-styles(
map-ext.pick($theme, map.keys(tab-indicator-theme.$light-theme)...)
);
}
}
}
10 changes: 7 additions & 3 deletions packages/mdc-tab/_tab-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ $custom-property-prefix: 'tab';
@include _divider-color(map.get($theme, divider-color));
@include _divider-height(map.get($theme, divider-height));

@include _icon-size(map.get($theme, with-icon-icon-size));

@include _active-icon-color(
(
default: map.get($theme, with-icon-active-icon-color),
Expand Down Expand Up @@ -543,9 +545,11 @@ $custom-property-prefix: 'tab';
}

@mixin _icon-size($size) {
@include theme.property('width', $size);
@include theme.property('height', $size);
@include theme.property('font-size', $size);
.mdc-tab__icon {
@include theme.property('width', $size);
@include theme.property('height', $size);
@include theme.property('font-size', $size);
}
}

@mixin _label-text-font-family($font-family) {
Expand Down

0 comments on commit e66bc9f

Please sign in to comment.