diff --git a/src/overlays/Modal.scss b/src/overlays/Modal.scss index 60cbb38..0cd4d1e 100644 --- a/src/overlays/Modal.scss +++ b/src/overlays/Modal.scss @@ -49,12 +49,21 @@ width: auto; } - max-height: 100vh; - max-width: 100vw; @media (min-width: $screen-md) { max-height: calc(100vh - var(--bloom-s6)); max-width: calc(100vw - var(--bloom-s6)); } + @supports (max-height: 100dvh) { + --max-height: 100dvh; + } + @supports not (max-height: 100dvh) { + @media (max-width: $screen-sm) { + padding-bottom: var(--bloom-s20); + border: none; + box-shadow: none; + background-clip: content-box; + } + } } .modal__header { @@ -147,4 +156,3 @@ --modal-margin-top: var(--bloom-s6); } } - diff --git a/src/overlays/Modal.stories.tsx b/src/overlays/Modal.stories.tsx index ed50c3a..b080dda 100644 --- a/src/overlays/Modal.stories.tsx +++ b/src/overlays/Modal.stories.tsx @@ -254,30 +254,6 @@ export const ScrollableModalMinimalContent = () => { ) } -export const TransparentOverlayModal = () => ( - - {text("Action 2 Label", "Submit")} - , - , - ]} - backdrop={false} - > - {text("Content", "Modal Content")} - -) - export const ManyButtons = () => { const [openModal, setOpenModal] = useState(false) diff --git a/src/overlays/Overlay.scss b/src/overlays/Overlay.scss index d6fa0f8..649d3f8 100644 --- a/src/overlays/Overlay.scss +++ b/src/overlays/Overlay.scss @@ -4,6 +4,9 @@ --overlay-background-color: var(--bloom-color-gray-950); --overlay-opacity: 0.5; --overlay-height: 100vh; + @supports (height: 100dvh) { + --overlay-height: 100dvh; + } position: fixed; display: flex;