Skip to content

Commit

Permalink
fix(dialog): Use 100vw for dialog max-width calculation. (#4766)
Browse files Browse the repository at this point in the history
Use 100vw as it doesn't have the same browser incompatibilities that 100vh does (see PR #4746 for context). 100% width on the other hand breaks on mobile/Safari.
  • Loading branch information
joyzhong authored and Matt Goo committed Jun 3, 2019
1 parent 3e9abda commit d0b8c89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mdc-dialog/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@

@mixin mdc-dialog-max-width($max-width, $margin, $query: mdc-feature-all()) {
$feat-structure: mdc-feature-create-target($query, structure);
$max-size-calc-expr: calc(100% - #{$margin * 2});
$max-size-calc-expr: calc(100vw - #{$margin * 2});

.mdc-dialog__surface {
@include mdc-feature-targets($feat-structure) {
Expand Down

0 comments on commit d0b8c89

Please sign in to comment.