mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-12-04 14:19:05 +00:00
Fixing toast animation
This commit is contained in:
Vendored
+13
-3
@@ -3155,7 +3155,6 @@
|
||||
.toaster {
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
right: calc(var(--spacing) * 0);
|
||||
bottom: calc(var(--spacing) * 0);
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
@@ -3165,12 +3164,23 @@
|
||||
@media (width >= 40rem) {
|
||||
max-width: calc(var(--spacing) * 90);
|
||||
}
|
||||
&:not([data-align]), &[data-align='end'] {
|
||||
right: calc(var(--spacing) * 0);
|
||||
}
|
||||
&[data-align='start'] {
|
||||
left: calc(var(--spacing) * 0);
|
||||
}
|
||||
&[data-align='center'] {
|
||||
left: calc(1/2 * 100%);
|
||||
--tw-translate-x: calc(calc(1/2 * 100%) * -1);
|
||||
translate: var(--tw-translate-x) var(--tw-translate-y);
|
||||
}
|
||||
.toast {
|
||||
pointer-events: auto;
|
||||
margin-top: calc(var(--spacing) * 4);
|
||||
display: grid;
|
||||
width: 100%;
|
||||
animation: toast-in 0.3s ease-in-out;
|
||||
animation: toast-up 0.3s ease-in-out;
|
||||
grid-template-rows: 1fr;
|
||||
transition-property: grid-template-rows,opacity,margin;
|
||||
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
||||
@@ -3206,7 +3216,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@keyframes toast-in {
|
||||
@keyframes toast-up {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(100%);
|
||||
|
||||
Vendored
+14
-4
@@ -773,13 +773,23 @@
|
||||
/* Toasts */
|
||||
@layer components {
|
||||
.toaster {
|
||||
@apply fixed bottom-0 right-0 p-4 pointer-events-none z-50 w-full sm:max-w-90 flex flex-col-reverse;
|
||||
@apply fixed bottom-0 p-4 pointer-events-none z-50 w-full sm:max-w-90 flex flex-col-reverse;
|
||||
|
||||
&:not([data-align]),
|
||||
&[data-align='end'] {
|
||||
@apply right-0;
|
||||
}
|
||||
&[data-align='start'] {
|
||||
@apply left-0;
|
||||
}
|
||||
&[data-align='center'] {
|
||||
@apply left-1/2 -translate-x-1/2;
|
||||
}
|
||||
.toast {
|
||||
@apply pointer-events-auto w-full mt-4 animate-[toast-in_0.3s_ease-in-out] grid grid-rows-[1fr] transition-[grid-template-rows,opacity,margin] duration-300 ease-in-out;
|
||||
@apply pointer-events-auto w-full mt-4 animate-[toast-up_0.3s_ease-in-out] grid grid-rows-[1fr] transition-[grid-template-rows,opacity,margin] duration-300 ease-in-out;
|
||||
|
||||
.toast-content {
|
||||
@apply text-popover-foreground text-[13px] bg-popover border shadow-lg rounded-lg overflow-hidden;
|
||||
@apply text-popover-foreground text-[13px] bg-popover border shadow-lg rounded-lg overflow-hidden;
|
||||
}
|
||||
&[aria-hidden='true'] {
|
||||
@apply grid-rows-[0fr] opacity-0 m-0 border-0 p-0 overflow-hidden;
|
||||
@@ -791,7 +801,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@keyframes toast-in {
|
||||
@keyframes toast-up {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(100%);
|
||||
|
||||
Reference in New Issue
Block a user