Skip to content

Commit 87ab712

Browse files
devversionandrewseguin
authored andcommitted
fix(button): raised buttons in dark theme (#3070)
* Fixes the wrong background and foreground color for raised buttons in a dark theme.
1 parent 6fe1d9a commit 87ab712

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/lib/button/_button-theme.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@
7171
}
7272

7373
.mat-raised-button, .mat-fab, .mat-mini-fab {
74+
// Default properties when not using any [color] value.
75+
color: mat-color($foreground, text);
76+
background-color: mat-color($background, raised-button);
77+
7478
@include _mat-button-theme-color($theme, 'color', default-contrast);
7579
@include _mat-button-theme-color($theme, 'background-color');
76-
background-color: mat-color($background, background);
7780
}
7881

7982
.mat-fab, .mat-mini-fab {

src/lib/core/theming/_palette.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,8 @@ $mat-light-theme-background: (
649649
hover: rgba(black, 0.04), // TODO(kara): check style with Material Design UX
650650
card: white,
651651
dialog: white,
652-
disabled-button: rgba(black, 0.12)
652+
disabled-button: rgba(black, 0.12),
653+
raised-button: white,
653654
);
654655

655656
// Background palette for dark themes.
@@ -660,7 +661,8 @@ $mat-dark-theme-background: (
660661
hover: rgba(white, 0.04), // TODO(kara): check style with Material Design UX
661662
card: map_get($mat-grey, 800),
662663
dialog: map_get($mat-grey, 800),
663-
disabled-button: rgba(white, 0.12)
664+
disabled-button: rgba(white, 0.12),
665+
raised-button: map-get($mat-grey, 800),
664666
);
665667

666668
// Foreground palette for light themes.

0 commit comments

Comments
 (0)