JSFiddle - React, Tailwind, and code Playground

by 규연 황

HTML

<div class="container">
  <span class="box"></span>
  <span class="box2">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit, pariatur.
  </span>
</div>
&#128519

SCSS

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 300px;
  height: 100px;
  border: 1px solid red;
  margin: 20px auto;
  position: relative;
  resize: vertical;
  overflow: hidden;
  .box {
    flex-shrink: 1;
    flex-grow: 0;
    width: 90px;
    height: 90px;
    margin-bottom: 10px;
    background: red;
  }
  .box2 {
    flex-shrink: 0;
    flex-grow: 0;
    height: 0;
  }
}