Skip to content

Instantly share code, notes, and snippets.

@victormejia
Created May 4, 2018 17:53
Show Gist options
  • Save victormejia/461e044f5ce39ea67a88174b07459611 to your computer and use it in GitHub Desktop.
Save victormejia/461e044f5ce39ea67a88174b07459611 to your computer and use it in GitHub Desktop.
$red: #c0392b;
$green: #27ae60;
$yellow: #f1c40f;
.status-pulse {
position: relative;
width: 10px;
height: 10px;
&:hover {
cursor: pointer;
}
}
.pulse {
width: 10px;
height: 10px;
border-radius: 30px;
position: absolute;
&.red {
background-color: $red;
}
&.green {
background-color: $green;
}
&.yellow {
background-color: $yellow;
}
}
.dot {
background: transparent;
border-radius: 60px;
height: 20px;
width: 20px;
position: absolute;
top: -10px;
left: -10px;
opacity: 0;
border-width: 5px;
border-style: solid;
&.red {
border-color: $red;
animation: pulse 2s ease-out;
animation-iteration-count: infinite;
}
&.green {
border: 10px solid $green;
}
&.yellow {
border: 10px solid $yellow;
}
}
@keyframes pulse {
0% {
transform: scale(0);
opacity: 0.0;
}
10% {
transform: scale(0.1);
opacity: 0.1;
}
20% {
transform: scale(0.2);
opacity: 0.2;
}
30% {
transform: scale(0.3);
opacity: 0.3;
}
40% {
transform: scale(0.4);
opacity: 0.4;
}
50% {
transform: scale(0.5);
opacity: 0.5;
}
60% {
transform: scale(0.6);
opacity: 0.6;
}
70% {
transform: scale(0.75);
opacity: 0.5;
}
80% {
transform: scale(0.8);
opacity: 0.4;
}
90% {
transform: scale(0.85);
opacity: 0.2;
}
100% {
transform: scale(0.9);
opacity: 0.0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment