Skip to content

Commit 67ce07a

Browse files
authored
refactor(button): refactor button themes (#16512)
1 parent 518e1e9 commit 67ce07a

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

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

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@
426426
&:active {
427427
background: var-get($flat-theme, 'focus-background');
428428
color: var-get($flat-theme, 'focus-foreground');
429+
border-color: var-get($flat-theme, 'focus-border-color');
429430

430431
igx-icon {
431432
color: var-get($flat-theme, 'focus-foreground');
@@ -524,18 +525,20 @@
524525
color: var-get($outlined-theme, 'focus-visible-foreground');
525526
border-color: var-get($outlined-theme, 'focus-visible-border-color');
526527

527-
igx-icon {
528-
color: var-get($outlined-theme, 'focus-visible-foreground');
528+
@if $variant == 'material' or $variant == 'bootstrap' {
529+
igx-icon {
530+
color: var-get($outlined-theme, 'icon-color-hover');
531+
}
532+
} @else {
533+
igx-icon {
534+
color: var-get($outlined-theme, 'icon-color');
535+
}
529536
}
530537

531538
@if $variant == 'bootstrap' {
532539
box-shadow: 0 0 0 rem(4px) var-get($outlined-theme, 'shadow-color');
533540
} @else if $variant == 'indigo' {
534541
box-shadow: 0 0 0 rem(3px) var-get($outlined-theme, 'shadow-color');
535-
536-
igx-icon {
537-
color: var-get($outlined-theme, 'icon-color');
538-
}
539542
}
540543

541544
&:hover {
@@ -551,15 +554,10 @@
551554
&:active {
552555
background: var-get($outlined-theme, 'focus-background');
553556
color: var-get($outlined-theme, 'focus-foreground');
557+
border-color: var-get($outlined-theme, 'focus-border-color');
554558

555-
@if $variant == 'material' {
556-
border-color: var-get($outlined-theme, 'focus-border-color');
557-
558-
igx-icon {
559-
color: var-get($outlined-theme, 'focus-foreground');
560-
}
561-
} @else {
562-
border-color: var-get($outlined-theme, 'active-border-color');
559+
igx-icon {
560+
color: var-get($outlined-theme, 'focus-foreground');
563561
}
564562

565563
@if $variant == 'indigo' {
@@ -681,6 +679,11 @@
681679
&:active {
682680
color: var-get($contained-theme, 'focus-foreground');
683681
background: var-get($contained-theme, 'focus-background');
682+
border-color: var-get($contained-theme, 'focus-border-color');
683+
684+
igx-icon {
685+
color: var-get($contained-theme, 'focus-foreground');
686+
}
684687

685688
@if $variant == 'indigo' {
686689
igx-icon {
@@ -818,6 +821,11 @@
818821
&:active {
819822
background: var-get($fab-theme, 'focus-background');
820823
color: var-get($fab-theme, 'focus-foreground');
824+
border-color: var-get($fab-theme, 'focus-border-color');
825+
826+
igx-icon {
827+
color: var-get($contained-theme, 'focus-foreground');
828+
}
821829

822830
@if $variant == 'indigo' {
823831
igx-icon {

0 commit comments

Comments
 (0)