Files
30-seconds-of-code/src/docs/styles/_toast.scss
2019-08-22 08:41:24 +03:00

33 lines
1.1 KiB
SCSS

// ===================================================
// Toast
// ===================================================
.toast {
position: fixed;
bottom: 16px;
margin-bottom: 0;
font-size: 0.75rem;
line-height: 1.5;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1111;
color: var(--toast-fore-color);
background: var(--toast-back-color);
border-radius: 2rem;
padding: 0.375rem 1.375rem 0.375rem 2.75rem;
box-shadow: 0px 0.25rem 0.5rem var(--toast-shadow-color);
transition: all 0.3s ease;
// Toast icon
&::before {
position: absolute;
content: '';
display: block;
top: 1px;
left: 1px;
height: 28px;
background: white;
width: 28px;
border-radius: 100%;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2305A864' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-check'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-position: center;
}
}