JSFiddle - React, Tailwind, and code Playground

by Stjepan Brbot

HTML

<table class="tms">

      <thead>
        <tr><!-- first THEAD's TR child -->
          <th> - - th - - </th>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <th> - - th - - </th>
          <th> - - th - - </th>
        </tr>
        <tr><!-- last THEAD' TR child -->
          <th> - - th - - </th>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <th> - - th - - </th>
          <th> - - th - - </th>
        </tr>
      </thead>

      <tbody>
        <tr><!-- first TBODY' TR child -->
          <th> - - th - - </th>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <th> - - th - - </th>
          <th> - - th - - </th>
        </tr>
        <tr><!-- last TBODY's TR child -->
          <td> - - td - - </td>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <td> - - td - - </td>
          <th> - - th - - </th>
          <th> - - th - - </th>
        </tr>
      </tbody>

    </table>

CSS

/* table */
TABLE.tms
{
  color: #444;
  font-size: 9pt;
  border-width: 1px;
  border-color: #999;
  border-spacing: 1px;
  border-collapse: separate;
  border-radius: 4px;
  background-color: #444;
  margin-left: auto;
  margin-right: auto;
  padding: 4px;
}

/* THEAD */
TABLE.tms THEAD TH,
TABLE.tms THEAD TD
{
  color: #fff;
  text-align: center;
  padding: 4px;
}

/* THEAD */
TABLE.tms THEAD TH
{
  width: 54px;
  font-size: 8pt;
  font-weight: normal;
  background-color: #f8f;
}
TABLE.tms THEAD TD
{
  font-size: 10pt;
  font-weight: bold;
  background-color: #99f;
}

/* TBODY */
TABLE.tms TH,
TABLE.tms TD
{
  padding: 4px;
}
TABLE.tms TD
{
  background-color: #99f;
}
TABLE.tms TD
{
  background-color: #f99;
}

/* CORNERS */
TABLE.tms *:first-child TR:first-child TH:first-child,
TABLE.tms *:first-child TR:first-child TD:first-child
{
  border-top-left-radius: 5px;
}
TABLE.tms *:first-child TR:first-child TH:last-child,
TABLE.tms *:first-child TR:first-child TD:last-child
{
  border-top-right-radius: 5px;
}
TABLE.tms *:last-child TR:last-child TH:first-child,
TABLE.tms *:last-child TR:last-child TD:first-child
{
  border-bottom-left-radius: 5px;
}
TABLE.tms *:last-child TR:last-child TH:last-child,
TABLE.tms *:last-child TR:last-child TD:last-child
{
  border-bottom-right-radius: 5px;
}
TABLE.tms TBODY TR:nth-child(even)
{
  background-color: #ddd;
}
TABLE.tms TBODY TR:nth-child(odd)
{
  background-color: #eee;
}