diff --git a/UNRELEASED.md b/UNRELEASED.md index 96b1d797afb..483533e4e13 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -12,6 +12,7 @@ - Fixed `TrapFocus` stealing focus from other `TrapFocus`'s ([#2681](https://github.com/Shopify/polaris-react/pull/2681)) - Fixed focus state color on monochrome `Buttons` ([#2684](https://github.com/Shopify/polaris-react/pull/2684)) +- Fixed container's width on `Modal` ([#2692](https://github.com/Shopify/polaris-react/pull/2692)) ### Documentation diff --git a/src/components/Modal/components/Dialog/Dialog.scss b/src/components/Modal/components/Dialog/Dialog.scss index eb80bfd1b45..a18f2abaf7d 100644 --- a/src/components/Modal/components/Dialog/Dialog.scss +++ b/src/components/Modal/components/Dialog/Dialog.scss @@ -33,7 +33,7 @@ $large-width: rem(980px); left: 0; display: flex; flex-direction: column; - width: 100vw; + width: 100%; max-height: calc(100vh - #{$vertical-spacing}); background: var(--p-surface, color('white')); box-shadow: var(--p-modal-shadow, shadow(layer)); @@ -64,7 +64,7 @@ $large-width: rem(980px); &.sizeLarge { @include breakpoint-after(layout-width(page-with-nav)) { - max-width: calc(100vw - #{$horizontal-spacing}); + max-width: calc(100% - #{$horizontal-spacing}); } @include breakpoint-after($large-width + $horizontal-spacing) {