Skip to content

Commit

Permalink
fix(material/dialog): invalid font-family declaration (#29516)
Browse files Browse the repository at this point in the history
We were emitting a font family value like `var(--mat-dialog-font, Roboto, sans-serif)` which is invalid. These changes remove the fallback since it was primarily there to make it easier to land the MDC changes.

(cherry picked from commit 95d1354)
  • Loading branch information
crisbeto committed Jul 30, 2024
1 parent 913267c commit 70048ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/material/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ $_emit-fallbacks: true;
.mat-mdc-dialog-container & {
@include _use-mdc-tokens {
@include token-utils.create-token-slot(color, subhead-color, $_emit-fallbacks);
@include token-utils.create-token-slot(font-family, subhead-font, $_emit-fallbacks);
@include token-utils.create-token-slot(font-family, subhead-font,
if($_emit-fallbacks, inherit, null));
@include token-utils.create-token-slot(line-height, subhead-line-height, $_emit-fallbacks);
@include token-utils.create-token-slot(font-size, subhead-size, $_emit-fallbacks);
@include token-utils.create-token-slot(font-weight, subhead-weight, $_emit-fallbacks);
Expand Down Expand Up @@ -203,7 +204,8 @@ $_emit-fallbacks: true;
.mat-mdc-dialog-container & {
@include _use-mdc-tokens {
@include token-utils.create-token-slot(color, supporting-text-color, $_emit-fallbacks);
@include token-utils.create-token-slot(font-family, supporting-text-font, $_emit-fallbacks);
@include token-utils.create-token-slot(font-family, supporting-text-font,
if($_emit-fallbacks, inherit, null));
@include token-utils.create-token-slot(line-height, supporting-text-line-height,
$_emit-fallbacks);
@include token-utils.create-token-slot(font-size, supporting-text-size, $_emit-fallbacks);
Expand Down

0 comments on commit 70048ef

Please sign in to comment.