pkg-components
Version:
138 lines (121 loc) • 2.36 kB
CSS
.notification-container {
font-size: 14px;
position: fixed;
z-index: 9999;
display: flex;
flex-direction: column;
}
.top-right {
top: 12px;
right: 12px;
transition: transform 0.6s ease-in-out;
animation: toast-in-right 0.7s;
}
.bottom-right {
bottom: 12px;
right: -12px;
width: min-content;
left: 0;
transition: transform 0.6s ease-in-out;
animation: toast-in-right 0.7s;
}
.top-left {
top: 12px;
left: 12px;
transition: transform 0.6s ease-in;
animation: toast-in-left 0.7s;
}
.bottom-left {
bottom: 12px;
left: 12px;
transition: transform 0.6s ease-in;
animation: toast-in-left 0.7s;
}
.notification {
transition: 0.3s ease;
position: relative;
pointer-events: auto;
overflow: hidden;
margin: 0 0 6px;
padding: 30px;
margin-bottom: 10px;
width: 300px;
max-height: 100px;
border-radius: 3px 3px 3px 3px;
box-shadow: 0 0 10px #999;
background-position: 15px;
background-repeat: no-repeat;
}
.notification:hover {
box-shadow: 0 0 12px #fff;
opacity: 1;
cursor: pointer;
}
.notification-title {
font-weight: 700;
font-size: 16px;
text-align: left;
margin-top: 0;
margin-bottom: 6px;
width: 300px;
height: 18px;
color: var(--color-base-white);
}
.notification-message {
margin: 0;
text-align: left;
height: 18px;
margin-left: -1px;
text-overflow: ellipsis;
white-space: wrap;
color: var(--color-base-white);
font-size: var(--font-size-base);
}
.notification-image {
float: left;
margin-right: 15px;
}
.notification-image img {
width: 30px;
height: 30px;
}
.toast {
height: 75px;
width: 370px;
color: var(--color-base-black);
padding: 10px;
}
.notification-button {
position: relative;
right: -0.3em;
top: -0.3em;
float: right;
font-weight: 700;
color: red;
outline: none;
border: none;
text-shadow: 0 1px 0 #fff;
opacity: 0.8;
line-height: 1;
font-size: 16px;
padding: 0;
cursor: pointer;
background: 0 0;
border: 0;
}
@keyframes toast-in-right {
from {
transform: translateX(100%);
}
to {
transform: translateX(0);
}
}
@keyframes toast-in-left {
from {
transform: translateX(-100%);
}
to {
transform: translateX(0);
}
}