Skip to content

Commit

Permalink
fix(snackbar): move elevation style to snackbar theme (#13273)
Browse files Browse the repository at this point in the history
Fixes a remaining elevation style which is not created inside of the theme. (related to: #11344)
  • Loading branch information
devversion authored and jelbourn committed Sep 25, 2018
1 parent e1071f0 commit 96e670f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/lib/snack-bar/_snack-bar-theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import '../core/typography/typography-utils';
@import '../core/theming/palette';
@import '../core/style/elevation';

@mixin mat-snack-bar-theme($theme) {
$is-dark-theme: map-get($theme, is-dark);
Expand All @@ -10,6 +11,8 @@
// a secondary, because the contrast on the light primary text is poor.
color: if($is-dark-theme, $dark-primary-text, $light-secondary-text);
background: if($is-dark-theme, map-get($mat-grey, 50), #323232);

@include _mat-theme-elevation(6, $theme);
}

.mat-simple-snackbar-action {
Expand Down
2 changes: 0 additions & 2 deletions src/lib/snack-bar/snack-bar-container.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../cdk/a11y/a11y';
@import '../core/style/elevation';

$mat-snack-bar-padding: 14px 16px !default;
$mat-snack-bar-min-height: 48px !default;
Expand All @@ -10,7 +9,6 @@ $mat-snack-bar-spacing-margin-handset: 8px !default;


.mat-snack-bar-container {
@include mat-elevation(6);
border-radius: 4px;
box-sizing: border-box;
display: block;
Expand Down

0 comments on commit 96e670f

Please sign in to comment.