Skip to content

Commit 16f5c30

Browse files
willshowellmmalerba
authored andcommitted
Use correct focus overlay for raised buttons (#3822)
- Only uses themed overlay for flat buttons and flat icon buttons - Dark overlay applies to all other buttons - Fixes #3820
1 parent 3f05286 commit 16f5c30

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/lib/button/_button-theme.scss

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,10 @@
7474
$background: map-get($theme, background);
7575
$foreground: map-get($theme, foreground);
7676

77-
.mat-button, .mat-icon-button, .mat-raised-button, .mat-fab, .mat-mini-fab {
78-
// Apply color to focus overlay.
79-
// The focus overlay will be visible when any button type is focused or when
80-
// flat buttons or icon buttons are hovered.
81-
@include _mat-button-focus-color($theme);
82-
}
83-
8477
.mat-button, .mat-icon-button {
8578
background: transparent;
8679

80+
@include _mat-button-focus-color($theme);
8781
@include _mat-button-theme-color($theme, 'color');
8882
}
8983

@@ -98,7 +92,7 @@
9892
// Add ripple effect with contrast color to buttons that don't have a focus overlay.
9993
@include _mat-button-ripple-color($theme, default-contrast);
10094
}
101-
95+
10296
// Add ripple effect with default color to flat buttons, which also have a focus overlay.
10397
.mat-button {
10498
@include _mat-button-ripple-color($theme, default, 0.1);

0 commit comments

Comments
 (0)