update
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
:root {
|
||||
--swal-red: #F27474;
|
||||
}
|
||||
|
||||
.swal-icon--error {
|
||||
border-color: var(--swal-red);
|
||||
animation: animateErrorIcon 0.5s;
|
||||
|
||||
&__x-mark {
|
||||
position: relative;
|
||||
display: block;
|
||||
animation: animateXMark 0.5s;
|
||||
}
|
||||
|
||||
&__line {
|
||||
position: absolute;
|
||||
height: 5px;
|
||||
width: 47px;
|
||||
background-color: var(--swal-red);
|
||||
display: block;
|
||||
top: 37px;
|
||||
border-radius: 2px;
|
||||
|
||||
&--left {
|
||||
transform: rotate(45deg);
|
||||
left: 17px;
|
||||
}
|
||||
|
||||
&--right {
|
||||
transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateErrorIcon {
|
||||
from {
|
||||
transform: rotateX(100deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: rotateX(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateXMark {
|
||||
0% {
|
||||
transform: scale(0.4);
|
||||
margin-top: 26px;
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.4);
|
||||
margin-top: 26px;
|
||||
opacity: 0;
|
||||
}
|
||||
80% {
|
||||
transform: scale(1.15);
|
||||
margin-top: -6px;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
margin-top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
:root {
|
||||
--swal-blue: #C9DAE1;
|
||||
}
|
||||
|
||||
.swal-icon--info {
|
||||
border-color: var(--swal-blue);
|
||||
|
||||
/* "i"-letter body */
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 29px;
|
||||
left: 50%;
|
||||
bottom: 17px;
|
||||
border-radius: 2px;
|
||||
margin-left: -2px;
|
||||
background-color: var(--swal-blue);
|
||||
}
|
||||
/* "i"-letter dot */
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
margin-left: -3px;
|
||||
top: 19px;
|
||||
background-color: var(--swal-blue);
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
:root {
|
||||
--swal-green: #A5DC86;
|
||||
--swal-green-light: rgba(165, 220, 134, 0.2);
|
||||
}
|
||||
|
||||
.swal-icon--success {
|
||||
border-color: var(--swal-green);
|
||||
|
||||
/* Moving circular line */
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 120px;
|
||||
background: white;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
&::before {
|
||||
border-radius: 120px 0 0 120px;
|
||||
top: -7px;
|
||||
left: -33px;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 60px 60px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
border-radius: 0 120px 120px 0;
|
||||
top: -11px;
|
||||
left: 30px;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0px 60px;
|
||||
animation: rotatePlaceholder 4.25s ease-in;
|
||||
}
|
||||
|
||||
/* Ring */
|
||||
&__ring {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 4px solid var(--swal-green-light);
|
||||
border-radius: 50%;
|
||||
box-sizing: content-box;
|
||||
position: absolute;
|
||||
left: -4px;
|
||||
top: -4px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* Hide corners left from animation */
|
||||
&__hide-corners {
|
||||
width: 5px;
|
||||
height: 90px;
|
||||
background-color: white;
|
||||
padding: 1px;
|
||||
position: absolute;
|
||||
left: 28px;
|
||||
top: 8px;
|
||||
z-index: 1;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
&__line {
|
||||
height: 5px;
|
||||
background-color: var(--swal-green);
|
||||
display: block;
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
|
||||
&--tip {
|
||||
width: 25px;
|
||||
left: 14px;
|
||||
top: 46px;
|
||||
transform: rotate(45deg);
|
||||
animation: animateSuccessTip 0.75s;
|
||||
}
|
||||
&--long {
|
||||
width: 47px;
|
||||
right: 8px;
|
||||
top: 38px;
|
||||
transform: rotate(-45deg);
|
||||
animation: animateSuccessLong 0.75s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotatePlaceholder {
|
||||
0% {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
5% {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
12% {
|
||||
transform: rotate(-405deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(-405deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateSuccessTip {
|
||||
0% {
|
||||
width: 0;
|
||||
left: 1px;
|
||||
top: 19px;
|
||||
}
|
||||
54% {
|
||||
width: 0;
|
||||
left: 1px;
|
||||
top: 19px;
|
||||
}
|
||||
70% {
|
||||
width: 50px;
|
||||
left: -8px;
|
||||
top: 37px;
|
||||
}
|
||||
84% {
|
||||
width: 17px;
|
||||
left: 21px;
|
||||
top: 48px;
|
||||
}
|
||||
100% {
|
||||
width: 25px;
|
||||
left: 14px;
|
||||
top: 45px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateSuccessLong {
|
||||
0% {
|
||||
width: 0;
|
||||
right: 46px;
|
||||
top: 54px;
|
||||
}
|
||||
65% {
|
||||
width: 0;
|
||||
right: 46px;
|
||||
top: 54px;
|
||||
}
|
||||
84% {
|
||||
width: 55px;
|
||||
right: 0px;
|
||||
top: 35px;
|
||||
}
|
||||
100% {
|
||||
width: 47px;
|
||||
right: 8px;
|
||||
top: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
:root {
|
||||
--swal-orange: #F8BB86;
|
||||
}
|
||||
|
||||
.swal-icon--warning {
|
||||
border-color: var(--swal-orange);
|
||||
animation: pulseWarning 0.75s infinite alternate;
|
||||
|
||||
/* Exclamation mark */
|
||||
&__body {
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 47px;
|
||||
left: 50%;
|
||||
top: 10px;
|
||||
border-radius: 2px;
|
||||
margin-left: -2px;
|
||||
background-color: var(--swal-orange);
|
||||
}
|
||||
|
||||
&__dot {
|
||||
position: absolute;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
margin-left: -4px;
|
||||
left: 50%;
|
||||
bottom: -11px;
|
||||
background-color: var(--swal-orange);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulseWarning {
|
||||
from {
|
||||
border-color: #F8D486;
|
||||
}
|
||||
to {
|
||||
border-color: var(--swal-orange);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user