Skip to content

Commit d665625

Browse files
authored
refactor(material/snack-bar): fix out-of-sync code (#25302)
Fixes some code that is out of sync with the code we have internally. I added the extra `@if` when I was resolving issues with #25273.
1 parent 1c7b940 commit d665625

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@
3434
$config: mat.private-typography-to-2018-config(
3535
mat.get-typography-config($config-or-theme));
3636
@include mat.private-using-mdc-typography($config) {
37-
.mat-mdc-snack-bar-container {
38-
@include mdc-snackbar-theme.theme((
39-
supporting-text-font: mat.font-family($config, body-2),
40-
supporting-text-line-height: mat.line-height($config, body-2),
41-
supporting-text-size: mat.font-size($config, body-2),
42-
supporting-text-weight: mat.font-weight($config, body-2),
43-
));
37+
@if ($config) {
38+
.mat-mdc-snack-bar-container {
39+
@include mdc-snackbar-theme.theme((
40+
supporting-text-font: mat.font-family($config, body-2),
41+
supporting-text-line-height: mat.line-height($config, body-2),
42+
supporting-text-size: mat.font-size($config, body-2),
43+
supporting-text-weight: mat.font-weight($config, body-2),
44+
));
45+
}
4446
}
4547
}
4648
}

0 commit comments

Comments
 (0)