diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/Dialog.test.tsx.snap b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/Dialog.test.tsx.snap index 35a1d38b983..576e1a91461 100644 --- a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/Dialog.test.tsx.snap +++ b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/Dialog.test.tsx.snap @@ -1918,11 +1918,11 @@ button.dnb-button::-moz-focus-inner { from { opacity: 0; } to { - opacity: var(--modal-overlay-opacity); } } + opacity: 1; } } @keyframes hide-modal-overlay { from { - opacity: var(--modal-overlay-opacity); } + opacity: 1; } to { opacity: 0; } } @@ -2288,8 +2288,7 @@ button.dnb-button::-moz-focus-inner { :root { --modal-z-index: 3000; --modal-animation-duration: 300ms; - --modal-overlay-bg: black; - --modal-overlay-opacity: 0.32; } + --modal-overlay-bg: rgba(0, 0, 0, 0.32); } html[data-dnb-modal-active] { user-select: none; @@ -2341,11 +2340,11 @@ html[data-dnb-modal-active] { height: 100%; background-color: var(--modal-overlay-bg); } .dnb-modal-root__inner .dnb-modal__overlay { - animation: hide-modal-overlay var(--modal-animation-duration) ease-in-out forwards; } + animation: hide-modal-overlay var(--modal-animation-duration) ease-out forwards; } .dnb-modal-root__inner:last-of-type .dnb-modal__overlay { - animation: show-modal-overlay var(--modal-animation-duration) ease-out forwards 0ms; } + animation: show-modal-overlay var(--modal-animation-duration) ease-out forwards; } .dnb-modal-root__inner:last-of-type .dnb-modal__overlay--hide { - animation: hide-modal-overlay var(--modal-animation-duration) ease-in-out forwards; } + animation: hide-modal-overlay var(--modal-animation-duration) ease-out forwards; } html[data-visual-test] .dnb-modal__overlay, .dnb-modal__overlay--no-animation { animation-delay: 0ms !important; animation-duration: 0ms !important; } diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/Drawer.test.tsx.snap b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/Drawer.test.tsx.snap index 494096c2914..519fc5d2433 100644 --- a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/Drawer.test.tsx.snap +++ b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/Drawer.test.tsx.snap @@ -1914,11 +1914,11 @@ button.dnb-button::-moz-focus-inner { from { opacity: 0; } to { - opacity: var(--modal-overlay-opacity); } } + opacity: 1; } } @keyframes hide-modal-overlay { from { - opacity: var(--modal-overlay-opacity); } + opacity: 1; } to { opacity: 0; } } @@ -2284,8 +2284,7 @@ button.dnb-button::-moz-focus-inner { :root { --modal-z-index: 3000; --modal-animation-duration: 300ms; - --modal-overlay-bg: black; - --modal-overlay-opacity: 0.32; } + --modal-overlay-bg: rgba(0, 0, 0, 0.32); } html[data-dnb-modal-active] { user-select: none; @@ -2337,11 +2336,11 @@ html[data-dnb-modal-active] { height: 100%; background-color: var(--modal-overlay-bg); } .dnb-modal-root__inner .dnb-modal__overlay { - animation: hide-modal-overlay var(--modal-animation-duration) ease-in-out forwards; } + animation: hide-modal-overlay var(--modal-animation-duration) ease-out forwards; } .dnb-modal-root__inner:last-of-type .dnb-modal__overlay { - animation: show-modal-overlay var(--modal-animation-duration) ease-out forwards 0ms; } + animation: show-modal-overlay var(--modal-animation-duration) ease-out forwards; } .dnb-modal-root__inner:last-of-type .dnb-modal__overlay--hide { - animation: hide-modal-overlay var(--modal-animation-duration) ease-in-out forwards; } + animation: hide-modal-overlay var(--modal-animation-duration) ease-out forwards; } html[data-visual-test] .dnb-modal__overlay, .dnb-modal__overlay--no-animation { animation-delay: 0ms !important; animation-duration: 0ms !important; } diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/Modal.test.tsx.snap b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/Modal.test.tsx.snap index d2a21efdab1..f8407683bc2 100644 --- a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/Modal.test.tsx.snap +++ b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/Modal.test.tsx.snap @@ -1929,11 +1929,11 @@ button.dnb-button::-moz-focus-inner { from { opacity: 0; } to { - opacity: var(--modal-overlay-opacity); } } + opacity: 1; } } @keyframes hide-modal-overlay { from { - opacity: var(--modal-overlay-opacity); } + opacity: 1; } to { opacity: 0; } } @@ -2299,8 +2299,7 @@ button.dnb-button::-moz-focus-inner { :root { --modal-z-index: 3000; --modal-animation-duration: 300ms; - --modal-overlay-bg: black; - --modal-overlay-opacity: 0.32; } + --modal-overlay-bg: rgba(0, 0, 0, 0.32); } html[data-dnb-modal-active] { user-select: none; @@ -2352,11 +2351,11 @@ html[data-dnb-modal-active] { height: 100%; background-color: var(--modal-overlay-bg); } .dnb-modal-root__inner .dnb-modal__overlay { - animation: hide-modal-overlay var(--modal-animation-duration) ease-in-out forwards; } + animation: hide-modal-overlay var(--modal-animation-duration) ease-out forwards; } .dnb-modal-root__inner:last-of-type .dnb-modal__overlay { - animation: show-modal-overlay var(--modal-animation-duration) ease-out forwards 0ms; } + animation: show-modal-overlay var(--modal-animation-duration) ease-out forwards; } .dnb-modal-root__inner:last-of-type .dnb-modal__overlay--hide { - animation: hide-modal-overlay var(--modal-animation-duration) ease-in-out forwards; } + animation: hide-modal-overlay var(--modal-animation-duration) ease-out forwards; } html[data-visual-test] .dnb-modal__overlay, .dnb-modal__overlay--no-animation { animation-delay: 0ms !important; animation-duration: 0ms !important; } diff --git a/packages/dnb-eufemia/src/components/modal/style/_modal-mixins.scss b/packages/dnb-eufemia/src/components/modal/style/_modal-mixins.scss index d1b1b049eb6..39ef9eb0350 100644 --- a/packages/dnb-eufemia/src/components/modal/style/_modal-mixins.scss +++ b/packages/dnb-eufemia/src/components/modal/style/_modal-mixins.scss @@ -88,12 +88,12 @@ opacity: 0; } to { - opacity: var(--modal-overlay-opacity); + opacity: 1; } } @keyframes hide-modal-overlay { from { - opacity: var(--modal-overlay-opacity); + opacity: 1; } to { opacity: 0; diff --git a/packages/dnb-eufemia/src/components/modal/style/_modal.scss b/packages/dnb-eufemia/src/components/modal/style/_modal.scss index a76140fd46e..ac542def0a3 100644 --- a/packages/dnb-eufemia/src/components/modal/style/_modal.scss +++ b/packages/dnb-eufemia/src/components/modal/style/_modal.scss @@ -8,8 +8,7 @@ :root { --modal-z-index: 3000; --modal-animation-duration: 300ms; - --modal-overlay-bg: black; - --modal-overlay-opacity: 0.32; + --modal-overlay-bg: rgba(0, 0, 0, 0.32); } html[data-dnb-modal-active] { @@ -84,17 +83,17 @@ html[data-dnb-modal-active] { } &-root__inner &__overlay { - animation: hide-modal-overlay var(--modal-animation-duration) - ease-in-out forwards; + animation: hide-modal-overlay var(--modal-animation-duration) ease-out + forwards; } &-root__inner:last-of-type &__overlay { animation: show-modal-overlay var(--modal-animation-duration) ease-out - forwards 0ms; + forwards; &--hide { animation: hide-modal-overlay var(--modal-animation-duration) - ease-in-out forwards; + ease-out forwards; } }