|
108 | 108 | </Container> |
109 | 109 |
|
110 | 110 | <transition name="slide-bottom" appear> |
111 | | - <div v-show="showAddCard" class="stack__card-add"> |
| 111 | + <div v-if="showAddCard" class="stack__card-add"> |
112 | 112 | <form :class="{ 'icon-loading-small': stateCardCreating }" |
113 | 113 | @submit.prevent.stop="clickAddCard()"> |
114 | 114 | <label for="new-stack-input-main" class="hidden-visually">{{ t('deck', 'Add a new card') }}</label> |
@@ -384,16 +384,12 @@ export default { |
384 | 384 | display: block; |
385 | 385 | position: absolute; |
386 | 386 | width: 100%; |
387 | | - height: 20px; |
388 | | - top: 30px; |
389 | | - left: 0px; |
| 387 | + height: $stack-gap; |
| 388 | + bottom: 0; |
390 | 389 | z-index: 99; |
391 | 390 | transition: top var(--animation-slow); |
392 | | - background-image: linear-gradient(180deg, var(--color-main-background) 3px, rgba(255, 255, 255, 0) 100%); |
393 | | -
|
394 | | - body.theme--dark & { |
395 | | - background-image: linear-gradient(180deg, var(--color-main-background) 3px, rgba(0, 0, 0, 0) 100%); |
396 | | - } |
| 391 | + background-image: linear-gradient(180deg, var(--color-main-background) 0%, transparent 100%); |
| 392 | + transform: translateY(100%); |
397 | 393 | } |
398 | 394 |
|
399 | 395 | & > * { |
@@ -451,9 +447,22 @@ export default { |
451 | 447 | flex-shrink: 0; |
452 | 448 | z-index: 100; |
453 | 449 | display: flex; |
454 | | - margin-bottom: 5px; |
455 | | - padding-top: var(--default-grid-baseline); |
| 450 | + padding-bottom: $stack-gap; |
456 | 451 | background-color: var(--color-main-background); |
| 452 | + position: relative; |
| 453 | +
|
| 454 | + // Smooth fade out of the cards at the top |
| 455 | + &:before { |
| 456 | + content: ''; |
| 457 | + display: block; |
| 458 | + position: absolute; |
| 459 | + width: 100%; |
| 460 | + height: $stack-gap; |
| 461 | + z-index: 99; |
| 462 | + transition: bottom var(--animation-slow); |
| 463 | + background-image: linear-gradient(0deg, var(--color-main-background) 0%, transparent 100%); |
| 464 | + transform: translateY(-100%); |
| 465 | + } |
457 | 466 |
|
458 | 467 | form { |
459 | 468 | display: flex; |
|
0 commit comments