Skip to content

Commit dcc5988

Browse files
committed
fix(button-theme): apply the four shadow parameters only to the material theme
1 parent 2da71c1 commit dcc5988

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

projects/igniteui-angular/src/lib/core/styles/components/button/_button-theme.scss

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
$contained-shadow--focus: map.get(
215215
(
216216
'material': var-get($contained-theme, 'focus-elevation'),
217-
'fluent': 0 0 0 rem(3px) var-get($contained-theme, 'shadow-color'),
217+
'fluent': none,
218218
'bootstrap': 0 0 0 rem(4px)
219219
var-get($contained-theme, 'shadow-color'),
220220
'indigo': 0 0 0 rem(3px) var-get($contained-theme, 'shadow-color'),
@@ -225,7 +225,7 @@
225225
$contained-shadow--active: map.get(
226226
(
227227
'material': var-get($contained-theme, 'active-elevation'),
228-
'fluent': 0 0 0 rem(3px) var-get($contained-theme, 'shadow-color'),
228+
'fluent': none,
229229
'bootstrap': 0 0 0 rem(4px)
230230
var-get($contained-theme, 'shadow-color'),
231231
'indigo': 0 0 0 rem(3px) var-get($contained-theme, 'shadow-color'),
@@ -256,7 +256,7 @@
256256
$fab-shadow--focus: map.get(
257257
(
258258
'material': var-get($fab-theme, 'focus-elevation'),
259-
'fluent': 0 0 0 rem(3px) var-get($fab-theme, 'shadow-color'),
259+
'fluent': none,
260260
'bootstrap': 0 0 0 rem(4px) var-get($fab-theme, 'shadow-color'),
261261
'indigo': 0 0 0 rem(3px) var-get($fab-theme, 'shadow-color'),
262262
),
@@ -266,7 +266,7 @@
266266
$fab-shadow--active: map.get(
267267
(
268268
'material': var-get($fab-theme, 'active-elevation'),
269-
'fluent': 0 0 0 rem(3px) var-get($fab-theme, 'shadow-color'),
269+
'fluent': none,
270270
'bootstrap': 0 0 0 rem(4px) var-get($fab-theme, 'shadow-color'),
271271
'indigo': 0 0 0 rem(3px) var-get($fab-theme, 'shadow-color'),
272272
),
@@ -573,7 +573,10 @@
573573
background: var-get($contained-theme, 'background');
574574
border-color: var-get($contained-theme, 'border-color');
575575
border-radius: var-get($contained-theme, 'border-radius');
576-
box-shadow: var-get($contained-theme, 'resting-elevation');
576+
577+
@if $variant == 'material' {
578+
box-shadow: var-get($contained-theme, 'resting-elevation');
579+
}
577580

578581
igx-icon {
579582
color: var-get($contained-theme, 'icon-color');
@@ -583,7 +586,10 @@
583586
color: var-get($contained-theme, 'hover-foreground');
584587
background: var-get($contained-theme, 'hover-background');
585588
border-color: var-get($contained-theme, 'hover-border-color');
586-
box-shadow: var-get($contained-theme, 'hover-elevation');
589+
590+
@if $variant == 'material' {
591+
box-shadow: var-get($contained-theme, 'hover-elevation');
592+
}
587593

588594
igx-icon {
589595
color: var-get($contained-theme, 'icon-color-hover');
@@ -594,7 +600,10 @@
594600
color: var-get($contained-theme, 'active-foreground');
595601
background: var-get($contained-theme, 'active-background');
596602
border-color: var-get($contained-theme, 'active-border-color');
597-
box-shadow: var-get($contained-theme, 'active-elevation');
603+
604+
@if $variant == 'material' {
605+
box-shadow: var-get($contained-theme, 'active-elevation');
606+
}
598607

599608
igx-icon {
600609
color: var-get($contained-theme, 'active-foreground');
@@ -713,7 +722,10 @@
713722
background: var-get($fab-theme, 'background');
714723
border-color: var-get($fab-theme, 'border-color');
715724
border-radius: var-get($fab-theme, 'border-radius');
716-
box-shadow: var-get($fab-theme, 'resting-elevation');
725+
726+
@if $variant == 'material' {
727+
box-shadow: var-get($fab-theme, 'resting-elevation');
728+
}
717729

718730
igx-icon {
719731
color: var-get($fab-theme, 'icon-color');
@@ -723,7 +735,10 @@
723735
color: var-get($fab-theme, 'hover-foreground');
724736
background: var-get($fab-theme, 'hover-background');
725737
border-color: var-get($fab-theme, 'hover-border-color');
726-
box-shadow: var-get($fab-theme, 'hover-elevation');
738+
739+
@if $variant == 'material' {
740+
box-shadow: var-get($fab-theme, 'hover-elevation');
741+
}
727742

728743
igx-icon {
729744
color: var-get($fab-theme, 'icon-color-hover');
@@ -734,7 +749,10 @@
734749
color: var-get($fab-theme, 'active-foreground');
735750
background: var-get($fab-theme, 'active-background');
736751
border-color: var-get($fab-theme, 'active-border-color');
737-
box-shadow: var-get($fab-theme, 'active-elevation');
752+
753+
@if $variant == 'material' {
754+
box-shadow: var-get($fab-theme, 'active-elevation');
755+
}
738756

739757
igx-icon {
740758
color: var-get($fab-theme, 'active-foreground');

0 commit comments

Comments
 (0)