:root {
--notification-background: #313e2c;
--notification-primary: #aaec8a;
--background: #FAF9FF;
}
* {
box-sizing: border-box;
margin: 0px;
padding: 0px;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--background);
}
.notification {
position: absolute;
width: max-content;
left: 0;
right: 0;
bottom: 24px;
margin-left: auto;
margin-right: auto;
border-radius: 6px;
background-color: var(
--notification-background);
color: var(--notification-primary);
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
transform: translateY(30px);
opacity: 0;
visibility: hidden;
animation: fade-in 3s linear;
}
.notification__icon {
height: 26px;
width: 26px;
margin-right: 4px;
}
.notification__body {
display: flex;
flex-direction: row;
align-items: center;
padding: 16px 8px;
}
.notification__progress {
position: absolute;
left: 4px;
bottom: 4px;
width: calc(100% - 8px);
height: 3px;
transform: scaleX(0);
transform-origin: left;
background: linear-gradient(
to right,
var(--notification-background),
var(--notification-primary)
);
border-radius: inherit;
animation: progress 2.5s 0.3s linear;
}
@keyframes fade-in {
5% {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
95% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes progress {
to {
transform: scaleX(1);
}
}