JSFiddle - React, Tailwind, and code Playground

by victorxpp

HTML

<section style="margin: 10px;">
<fieldset style="min-height:150px;max-width:450px">
<legend><b> Legend </b> </legend>
<div class='my-legend'>
<div class='legend-scale'>
  <ul class='legend-labels'>
    <li><span style='background:#00b050;'></span>Webster Lead</li>
    <li><span style='background:#92d050;'></span>Webster Tech</li>
    <li><span style='background:#ff0000;'></span>Calgary Lead</li>
    <li><span style='background:#ff7c80;'></span>Calgary Tech</li>
    <li><span style='background:#3333ff;'></span>Shorewood Lead</li>
    <li><span style='background:#548dd4;'></span>Shorewood Tech</li>
  </ul>
    <ul class='legend-labels'>
    <li><span style='background:#00ffff;'></span>Vianen Lead</li>
    <li><span style='background:#afffff;'></span>Vianen Tech</li>
    <li><span style='background:#674ea7;'></span>Abu Dhabi Lead</li>
    <li><span style='background:#ccc0d9;'></span>Abu Dhabi Tech</li>
    <li><span style='background:#a64d79;'></span>Mexico City Lead</li>
    <li><span style='background:#d5a6bd;'></span>Mexico City Tech</li>
  </ul>
      <ul class='legend-labels'>
    <li><span style='background:#f6b26b;'></span>Pipeline Projects</li>
    <li><span style='background:#bebebe;'></span>Other Office</li>
    <li><span style='background:#f8ff91;'></span>Vacation/PTO</li>
    <li><span style='background:#ffdafc;'></span>Training/Meeting</li>
  </ul>

</div>
</div>
</fieldset>

CSS

fieldset {
    font-family: sans-serif;
    border: 5px solid #f5821f;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
}

fieldset legend:hover {
  background: #ff7b29;
  border-radius: 30%;
}


fieldset legend {
    background: #f5821f;
    color: #fff;
    padding: 5px 10px ;
    font-size: 25px;
    border-radius: 5px;
    margin-left: 20px;
    transition-property: background, border-radius;
    transition-duration: 0.2s, 1s;
    transition-timing-function: linear;
}

  .my-legend .legend-scale ul {
    margin: 0;
    margin-bottom: 5px;
    padding: 0;
    float: left;
    list-style: none;

    }
  .my-legend .legend-scale ul li {
    font-size: 80%;
    list-style: none;
    margin-left: 0;
    line-height: 30px;
    margin-bottom: 2px;
    }
  .my-legend ul.legend-labels li span {
    display: block;
    float: left;
    height: 25px;
    width: 25px;
    border-radius: 50%;
    margin-right: 5px;
    margin-left: 15px;
    border: 1px solid #999;
    }
  .my-legend a {
    color: #777;
    }
    
@-webkit-keyframes scale-in-center {
  0% {
    -webkit-transform: scale(0);
            transform: scale(0);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
    opacity: 1;
  }
}
@keyframes scale-in-center {
  0% {
    -webkit-transform: scale(0);
            transform: scale(0);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
    opacity: 1;
  }
}