diff --git a/modules/modal/css/lib/modal.scss b/modules/modal/css/lib/modal.scss index 68eba7237a..2fb1535078 100644 --- a/modules/modal/css/lib/modal.scss +++ b/modules/modal/css/lib/modal.scss @@ -3,7 +3,7 @@ background: none; } to { - background: rgba(0,0,0,0.65); + background: rgba(0, 0, 0, 0.65); } } @@ -19,17 +19,32 @@ } .wdc-modal-bg { - align-items: center; animation-duration: 0.3s; animation-name: wdc-modal-bg-animation; - background: rgba(0,0,0,0.65); - display: flex; - height: 100vh; - justify-content: center; + background: rgba(0, 0, 0, 0.65); + display: inline-block; left: 0; position: fixed; top: 0; - width: 100vw; + bottom: 0; + right: 0; + overflow-x: hidden; + overflow-y: auto; +} + +.wdc-modal-dialog { + display: flex; + align-items: center; + justify-content: center; + margin: 1.75rem auto; + min-height: calc(100% - (1.75rem * 2)); + + // IE11 fix for setting min-height in a flex container + &::before { + display: block; + height: calc(100vh - (1.75rem * 2)); + content: ''; + } } .wdc-modal { diff --git a/modules/modal/css/stories.tsx b/modules/modal/css/stories.tsx index 4db161e8b7..d6aea7b3c8 100644 --- a/modules/modal/css/stories.tsx +++ b/modules/modal/css/stories.tsx @@ -33,37 +33,39 @@ class ModalWrapper extends React.Component<{}, ModalWrapperState> { {open ? (