Comment faire une boîte réactive dans CSS

.square {
  width: 50%;
}

.square:after {
  content: "";
  display: block;
  padding-bottom: 100%;
}
Anxious Angelfish