JSFiddle - React, Tailwind, and code Playground

by Sebastian Kay

HTML

<div class="parent">
  <div class="child-1">child-1</div>
  
  <div class="child-2">child-2</div>
</div>

CSS

.parent {
  display: flex;
  flex-direction: column;
}

.child-1 {
  background: lightgreen;
  min-height: 200px;
}
.child-2 {
  background: wheat;
  min-height: 200px;
}

@media (orientation:landscape) {
  .parent {
    flex-direction: row;
  }
  .child-1 {
    min-width: 260px;
  }
  .child-2 {
    flex-basis: 100%;
    background: red;
  }
}