From 7ed9550513e8ff7a8d18c009c0023e646b187c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Fri, 14 Oct 2022 13:56:30 +0200 Subject: [PATCH] feat(DrawerList): animate position when used inside dnb-scroll-view (#1633) --- .../__tests__/__snapshots__/DrawerList.test.js.snap | 3 +++ .../src/fragments/drawer-list/style/_drawer-list.scss | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap index b1102227dc1..4cc2d320356 100644 --- a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap +++ b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap @@ -1106,7 +1106,10 @@ exports[`DrawerList scss have to match snapshot 1`] = ` /* stylelint-disable-next-line */ } .dnb-drawer-list__portal__style { position: absolute; + transition: all 300ms var(--easing-default); z-index: 3200; } + html[data-visual-test] .dnb-drawer-list__portal__style { + animation-duration: 1ms !important; } .dnb-drawer-list__portal__style--fixed { position: fixed; } .dnb-drawer-list__root { diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/style/_drawer-list.scss b/packages/dnb-eufemia/src/fragments/drawer-list/style/_drawer-list.scss index 68b9015c9db..ab404bbed0c 100644 --- a/packages/dnb-eufemia/src/fragments/drawer-list/style/_drawer-list.scss +++ b/packages/dnb-eufemia/src/fragments/drawer-list/style/_drawer-list.scss @@ -68,6 +68,11 @@ &__portal__style { position: absolute; + transition: all 300ms var(--easing-default); + + html[data-visual-test] & { + animation-duration: 1ms !important; + } // higher than modal --modal-z-index: z-index: 3200;