@opensig/opendesign
Version:
93 lines (83 loc) • 2.04 kB
CSS
.o-toast {
display: flex;
align-items: var(--toast-align);
justify-content: space-between;
width: fit-content;
max-width: var(--toast-max-width);
padding: var(--toast-padding);
font-size: var(--toast-font-size);
line-height: var(--toast-line-height);
text-align: left;
word-break: break-word;
color: var(--toast-color);
background-color: var(--toast-bg-color);
border-radius: var(--toast-radius);
box-shadow: var(--toast-shadow);
transition: all var(--o-duration-m1) var(--o-easing-standard-out);
}
.o-toast-list {
position: fixed;
z-index: var(--z-index);
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
}
.o-toast-list-top {
top: var(--toast-list-top-offset);
}
.o-toast-list-top .o-toast + .o-toast {
margin-top: var(--toast-gap);
}
.o-toast-list-center {
top: 50%;
transform: translate(-50%, -50%);
}
.o-toast-list-center .o-toast + .o-toast {
margin-top: var(--toast-gap);
}
.o-toast-list-bottom {
bottom: var(--toast-list-bottom-offset);
}
.o-toast-list-bottom .o-toast + .o-toast {
margin-top: var(--toast-gap);
}
.o-toast-fade-enter-from {
opacity: 0;
}
.o-toast-fade-enter-active,
.o-toast-fade-leave-active {
transition: all var(--o-duration-m1) var(--o-easing-standard-out);
}
.o-toast-fade-leave-to {
opacity: 0;
}
.o-toast {
--toast-padding: 9px 16px;
--toast-bg-color: rgb(var(--o-grey-11));
--toast-color: var(--o-color-info1-inverse);
--toast-radius: 4px;
--toast-font-size: var(--o-font_size-tip1);
--toast-line-height: var(--o-line_height-tip1);
--toast-shadow: var(--o-shadow-3);
--toast-gap: 16px;
--toast-align: center;
--toast-max-width: 100%;
}
.o-toast-list {
--toast-list-offset: 80px;
--toast-list-top-offset: var(--toast-list-offset);
--toast-list-bottom-offset: var(--toast-list-offset);
--z-index: 1001;
}
@media (max-width: 840px) {
.o-toast {
--toast-max-width: 75%;
}
}
@media (max-width: 600px) {
.o-toast {
--toast-max-width: 100%;
}
}