Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DrawerList): animate max-height when changed during scrolling #1631

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ exports[`DrawerList scss have to match snapshot 1`] = `
.dnb-drawer-list--scroll .dnb-drawer-list__options {
min-height: 2rem;
max-height: 70vh;
transition: max-height 300ms var(--easing-default);
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
Expand All @@ -1159,6 +1160,9 @@ exports[`DrawerList scss have to match snapshot 1`] = `
scroll-behavior: smooth; }
html[data-visual-test] .dnb-drawer-list--scroll .dnb-drawer-list__options {
scroll-behavior: auto !important; }
html[data-visual-test] .dnb-drawer-list--scroll .dnb-drawer-list__options,
.dnb-drawer-list--scroll.dnb-drawer-list--no-animation .dnb-drawer-list__options {
animation-duration: 1ms !important; }
.dnb-drawer-list--opened .dnb-drawer-list__options {
scroll-behavior: smooth; }
.dnb-drawer-list--no-scroll-animation .dnb-drawer-list__options {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,14 @@
&--scroll &__options {
min-height: 2rem;
max-height: 70vh;
transition: max-height 300ms var(--easing-default);

@include scrollY(auto);
}
html[data-visual-test] &--scroll &__options,
&--scroll#{&}--no-animation &__options {
animation-duration: 1ms !important;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the !important is necessary 🙏

}
&--opened &__options {
scroll-behavior: smooth;
}
Expand Down