JSFiddle - React, Tailwind, and code Playground

by Dominik Wilk

HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <div class="container">
      <div class="name">nazwa</div>
      <div class="photo">zdjęcie</div>
      <div class="price">cena</div>
      <div class="description">opis</div>
    </div>
  </body>
</html>

SCSS

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

.container {  
  @media (min-width: 768px) {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: auto;
    align-items: start;
  }

  div {
    padding: 20px;
  }

  .name {
    background: orange;

    @media (min-width: 768px) {
    }
  }

  .photo {
    background: yellow;

    @media (min-width: 768px) {
      padding: 100px 20px;
    }
  }

  .price {
    background: purple;

    @media (min-width: 768px) {
      padding: 150px 20px;
    }
  }

  .description {
    background: blue;
  }
}