Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #94 from ToBinio/better-dropdown-transition
Browse files Browse the repository at this point in the history
improve dropdown transitions
  • Loading branch information
Prospector authored Oct 11, 2023
2 parents 28b63ba + 323a74e commit d1a0cd1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/components/base/DropdownButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ onBeforeUnmount(() => {
.btn {
height: 2.25rem;
transition: 0.05s;
&:not(.render-down):not(.render-up) {
transition-delay: 0.2s;
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions lib/components/base/DropdownSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ const isChildOfDropdown = (element) => {
border-radius: var(--radius-md);
box-shadow: var(--shadow-inset-sm), 0 0 0 0 transparent;
transition: 0.05s;
&:not(.render-down):not(.render-up) {
transition-delay: 0.2s;
}
&.disabled {
cursor: not-allowed;
filter: grayscale(50%);
Expand All @@ -232,6 +238,7 @@ const isChildOfDropdown = (element) => {
.arrow {
transition: transform 0.2s ease;
&.rotate {
transform: rotate(180deg);
}
Expand Down
6 changes: 6 additions & 0 deletions lib/components/search/SearchDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ const isChildOfDropdown = (element) => {
box-shadow: var(--shadow-inset-sm), 0 0 0 0 transparent !important;
width: 100%;
transition: 0.05s;
&:focus {
&.down {
border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
Expand All @@ -325,5 +327,9 @@ const isChildOfDropdown = (element) => {
border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
}
}
&:not(:focus) {
transition-delay: 0.2s;
}
}
</style>

0 comments on commit d1a0cd1

Please sign in to comment.