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

improvement(tabs): Fix tab bar indicator precedence issue & Icon size css properties are applied to icon #7799

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
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