This repository was archived by the owner on Jan 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +56
-12
lines changed Expand file tree Collapse file tree 3 files changed +56
-12
lines changed Original file line number Diff line number Diff line change 34
34
@function _resolve-theme-elevation ($theme , $resolver ) {
35
35
$elevation : map .get ($theme , menu-container-elevation );
36
36
$shadow-color : map .get ($theme , menu-container-shadow-color );
37
- $resolved-value : meta .call (
38
- $resolver ,
39
- $elevation : $elevation ,
40
- $shadow-color : $shadow-color
41
- );
42
- $theme : map .set ($theme , menu-container-elevation , $resolved-value );
37
+ @if $elevation and $shadow-color {
38
+ $resolved-value : meta .call (
39
+ $resolver ,
40
+ $elevation : $elevation ,
41
+ $shadow-color : $shadow-color
42
+ );
43
+ $theme : map .set ($theme , menu-container-elevation , $resolved-value );
44
+ }
43
45
@return $theme ;
44
46
}
Original file line number Diff line number Diff line change @@ -707,11 +707,13 @@ $_light-theme: (
707
707
}
708
708
709
709
@mixin _menu-container-elevation ($elevation ) {
710
- .mdc-select__menu {
711
- @include elevation-theme .shadow (map .get ($elevation , shadow ));
712
- @include elevation-theme .overlay-opacity (
713
- map .get ($elevation , overlay-opacity )
714
- );
710
+ @if $elevation {
711
+ .mdc-select__menu {
712
+ @include elevation-theme .shadow (map .get ($elevation , shadow ));
713
+ @include elevation-theme .overlay-opacity (
714
+ map .get ($elevation , overlay-opacity )
715
+ );
716
+ }
715
717
}
716
718
}
717
719
@@ -975,7 +977,10 @@ $_light-theme: (
975
977
$query : feature-targeting .all ()
976
978
) {
977
979
@if (meta .type-of ($radius ) == ' list' and list .length ($radius ) > 2 ) and
978
- (list .nth ($radius , 3 ) != 0 or list .nth ($radius , 4 ) != 0 )
980
+ (
981
+ (list .nth ($radius , 3 ) != 0 and list .nth ($radius , 3 ) != 0px ) or
982
+ (list .nth ($radius , 4 ) != 0 and list .nth ($radius , 4 ) != 0px )
983
+ )
979
984
{
980
985
@error " mdc-select: Invalid radius #{$radius } . Only top-left and top-right corners may be customized." ;
981
986
}
Original file line number Diff line number Diff line change
1
+ @use ' third_party/javascript/material_components_web/tokens/v0_132/' as tokens ;
2
+ @use ' true' as test ;
3
+
4
+ @use ' ../select-filled-theme' ;
5
+ @use ' ../select-outlined-theme' ;
6
+
7
+ @include test .describe (' select-filled-theme' ) {
8
+ @include test .describe (' theme-styles()' ) {
9
+ @include test .it (' return no styles when no theme is provided' ) {
10
+ @include test .assert {
11
+ @include test .output {
12
+ @include select-filled-theme .theme-styles (());
13
+ }
14
+
15
+ @include test .expect {
16
+ // No content. This is testing that an error isn't thrown.
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ @include test .describe (' select-outlined-theme' ) {
24
+ @include test .describe (' theme-styles()' ) {
25
+ @include test .it (' return no styles when no theme is provided' ) {
26
+ @include test .assert {
27
+ @include test .output {
28
+ @include select-outlined-theme .theme-styles (());
29
+ }
30
+
31
+ @include test .expect {
32
+ // No content. This is testing that an error isn't thrown.
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
You can’t perform that action at this time.
0 commit comments