.flexelement {
  height: 200px;
  flex: 1 1 25%;
}

button {
  width: stretch;
  height: stretch;
  margin: 5px;
}

@media (max-aspect-ratio: 1/1) {
  .flexelement {
    flex: 1 1 100%;
  }
}