Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit d0b8c89

Browse files
joyzhongMatt Goo
authored andcommitted
fix(dialog): Use 100vw for dialog max-width calculation. (#4766)
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.
1 parent 3e9abda commit d0b8c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mdc-dialog/_mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392

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

397397
.mdc-dialog__surface {
398398
@include mdc-feature-targets($feat-structure) {

0 commit comments

Comments
 (0)