JSFiddle - React, Tailwind, and code Playground

by Kevin Bratt

HTML

<div id="info">Hover over ></div>

<div class="led red active">
  <div class="hilight"></div>
</div>

<div class="led yellow">
  <div class="hilight"></div>
</div>

<div class="led yellow blink">
  <div class="hilight"></div>
</div>

<div class="led yellow active">
  <div class="hilight"></div>
</div>

CSS

body {
  background: #777;
}

#info {
  color: white;
  font-family: sans-serif;
  font-weight: bold;
  position: absolute;
}

.led {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
  margin: 20px auto;
  border: 3px solid rgba(51, 51, 51, 0);
}

.led.red {
  background-color: rgba(34, 0, 0, 1);
}

.led.green {
  background-color: rgba(0, 34, 0, 1);
}

.led.yellow {
  background-color: rgba(34, 34, 0, 1);
}

.led.yellow.blink {
  -webkit-animation: led-yellow-blink 2s infinite;
  -moz-animation: led-yellow-blink 2s infinite;
  -ms-animation: led-yellow-blink 2s infinite;
  -o-animation: led-yellow-blink 2s infinite;
  animation: led-yellow-blink 2s infinite;
}

@-webkit-keyframes led-yellow-blink {
  from {
    background-color: rgba(34, 34, 0, 1);
    box-shadow: none;
	border: 3px solid rgba(51, 51, 51, 0);
  }
  25% {
    background-color: rgba(170, 170, 0, 1);
    box-shadow: 0px 0px 10px 5px rgba(255, 255, 0, 0.4);
    border: 3px solid rgba(120, 120, 0, 1);
  }
  to {
    background-color: rgba(34, 34, 0, 1);
    box-shadow: none;
	border: 3px solid rgba(51, 51, 51, 0);
  }
}

@-moz-keyframes led-yellow-blink {
  from {
    background-color: rgba(34, 34, 0, 1);
    box-shadow: none;
	border: 3px solid rgba(51, 51, 51, 0);
  }
  25% {
    background-color: rgba(170, 170, 0, 1);
    box-shadow: 0px 0px 10px 5px rgba(255, 255, 0, 0.4);
    border: 3px solid rgba(120, 120, 0, 1);
  }
  to {
    background-color: rgba(34, 34, 0, 1);
    box-shadow: none;
	border: 3px solid rgba(51, 51, 51, 0);
  }
}


@-ms-keyframes led-yellow-blink {
  from {
    background-color: rgba(34, 34, 0, 1);
    box-shadow: none;
	border: 3px solid rgba(51, 51, 51, 0);
  }
  25% {
    background-color: rgba(170, 170, 0, 1);
    box-shadow: 0px 0px 10px 5px rgba(255, 255, 0, 0.4);
    border: 3px solid rgba(120, 120, 0, 1);
  }
  to {
    background-color: rgba(34, 34, 0, 1);
    box-shadow: none;
	border: 3px solid rgba(51, 51, 51, 0);
 ...