JSFiddle - React, Tailwind, and code Playground

by enagu

HTML

<div id="template-recientes">
   <div class="categ-template">
     <h1 class="titulo">
       <div class="titulo-content"></div>
     </h1>
     <div class="content-categ-template">
       <div class="item-template"></div>
       <div class="item-template"></div>
       <div class="item-template"></div>
       <div class="item-template"></div>
     </div>
   </div>
   <div class="categ-template">
     <h1 class="titulo">
       <div class="titulo-content"></div>
     </h1>
     <div class="content-categ-template">
       <div class="item-template"></div>
       <div class="item-template"></div>
       <div class="item-template"></div>
       <div class="item-template"></div>
     </div>
   </div>
</div>

SCSS

body {
  background: #20262E;
  padding: 5px;
  font-family: Helvetica;
  width: 400px;
}

#app {
  background: #fff;
  border-radius: 4px;
  padding: 5px;
  transition: all 0.2s;
  text-align: center;
}

.categ-template{
  font-style: italic;
  .titulo{
    //font-family: 'latoitalic';
    position: relative;
    width: calc(43% - 20px);
    height: 20px;
    background-color: #aaa;
    display: flex;
    justify-content: center;
    align-items: center;
    
    &:after{
      content: '';
      background-color: rgba(0, 0, 0, 0.09019);
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 19%;
      height: 5%;
      border-radius: 29px;
    }
    .titulo-content{
      background-color: #dbdbdb;
      width: 95%;
      height: 80%;
    }
  }
  .content-categ-template{
    
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    .item-template{
      width: calc(53% - 20px);
      height: 69px;
      background-color: #aaa;
      margin: 0 5px 5px 0;
    }
  }
}