JSFiddle - React, Tailwind, and code Playground

by grassog

HTML

<div class="stopwatch">
    <div class="stopwatch__panel">
        <div class="stopwatch__header">
            <div class="stopwatch__title">Random Title 404531</div>
        </div>
        <div class="stopwatch__body">
            <div class="stopwatch__counter">
                <div class="stopwatch__segment stopwatch__segment--five">
                    <div class="stopwatch__segmentTopLeft"></div>
                    <div class="stopwatch__segmentTop"></div>
                    <div class="stopwatch__segmentTopRight"></div>
                    <div class="stopwatch__segmentMiddle">
                        <div class="stopwatch__segmentMiddleTop"></div>
                        <div class="stopwatch__segmentMiddleBottom"></div>
                    </div>
                    <div class="stopwatch__segmentBottomLeft"></div>
                    <div class="stopwatch__segmentBottom"></div>
                    <div class="stopwatch__segmentBottomRight"></div>
                </div>
                <div class="stopwatch__segment stopwatch__segment--five">
                    <div class="stopwatch__segmentTopLeft"></div>
                    <div class="stopwatch__segmentTop"></div>
                    <div class="stopwatch__segmentTopRight"></div>
                    <div class="stopwatch__segmentMiddle">
                        <div class="stopwatch__segmentMiddleTop"></div>
                        <div class="stopwatch__segmentMiddleBottom"></div>
                    </div>
                    <div class="stopwatch__segmentBottomLeft"></div>
                    <div class="stopwatch__segmentBottom"></div>
                    <div class="stopwatch__segmentBottomRight"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="stopwatch__panel">
        <div class="stopwatch__header">
            <div class="stopwatch__title">Random Title 714895</div>
        </div>
        <div class="stopwatch__body">
            <div...

CSS

.stopwatch {
  position: fixed;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  max-width: 100%;
  width: 100%; }
  .stopwatch__panel {
    background-color: #ffffff;
    border: 1px solid #dddddd;
    display: flex;
    flex-flow: column;
    min-width: 0; }
  .stopwatch__header {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    order: 1; }
  .stopwatch__title {
    flex: 1 1 auto;
    padding: 5px;
    border-left: 1px solid #dddddd;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }
  .stopwatch__body {
    display: flex;
    align-items: stretch; }
  .stopwatch__counter {
    background-color: #333333;
    padding: 15px;
    flex-grow: 1;
    text-align: center;
    color: #ffffff;
    display: flex;
    overflow:hidden;
    align-items: center;
    justify-content: center; }
  .stopwatch__segment {
    position: relative;
    float: left;
    margin: 6px;
    width: 18px;
    height: 35px;
    transition: all 200ms ease-in-out; }
    .stopwatch__segment--zero .stopwatch__segmentTopRight {
      border-right-color: #e6e6e6; }
    .stopwatch__segment--zero .stopwatch__segmentTop {
      border-top-color: #e6e6e6; }
    .stopwatch__segment--zero .stopwatch__segmentTopLeft {
      border-left-color: #e6e6e6; }
    .stopwatch__segment--zero .stopwatch__segmentBottomRight {
      border-right-color: #e6e6e6; }
    .stopwatch__segment--zero .stopwatch__segmentBottom {
      border-bottom-color: #e6e6e6; }
    .stopwatch__segment--zero .stopwatch__segmentBottomLeft {
      border-left-color: #e6e6e6; }
    .stopwatch__segment--one .stopwatch__segmentTopRight {
      border-right-color: #e6e6e6; }
    .stopwatch__segment--one .stopwatch__segmentBottomRight {
      border-right-color: #e6e6e6; }
    .stopwatch__segment--two .stopwatch__segmentTopRight {
      border-right-color: #e6e6e6; }
    .stopwatch__segment--two...