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

Commit

Permalink
refactor(select): resolve elevation earlier in sass mixin.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 487339963
  • Loading branch information
codr authored and copybara-github committed Nov 9, 2022
1 parent 3e3f433 commit 3f667fa
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions packages/mdc-select/_select-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ $_custom-property-prefix: 'select';

@mixin theme-styles($theme, $resolvers: resolvers.$material) {
@include theme.validate-theme-styles($_light-theme, $theme);
$theme: select-shared-theme.resolve-theme($theme, $resolvers);
$theme: keys.create-theme-properties(
$theme,
$prefix: $_custom-property-prefix
Expand Down Expand Up @@ -356,11 +357,7 @@ $_custom-property-prefix: 'select';
)
);
@include _menu-container-color(map.get($theme, menu-container-color));
@include _menu-container-elevation(
map.get($resolvers, elevation),
$shadow-color: map.get($theme, menu-container-shadow-color),
$elevation: map.get($theme, menu-container-elevation)
);
@include _menu-container-elevation(map.get($theme, menu-container-elevation));
@include _menu-container-shape(map.get($theme, menu-container-shape));
@include _menu-divider-color(map.get($theme, menu-divider-color));
@include _menu-divider-height(map.get($theme, menu-divider-height));
Expand Down Expand Up @@ -684,12 +681,11 @@ $_custom-property-prefix: 'select';
}
}

@mixin _menu-container-elevation($resolver, $shadow-color, $elevation) {
@mixin _menu-container-elevation($elevation) {
.mdc-select__menu {
@include elevation-theme.with-resolver(
$resolver,
$elevation: $elevation,
$shadow-color: $shadow-color
@include elevation-theme.shadow(map.get($elevation, shadow));
@include elevation-theme.overlay-opacity(
map.get($elevation, overlay-opacity)
);
}
}
Expand Down

0 comments on commit 3f667fa

Please sign in to comment.