.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 6rem);
  gap: 1rem;
}

figure {
  margin: 0;
  font: 0.875rem system-ui, sans-serif;
  text-align: center;
}

img {
  display: block;
  inline-size: 6rem;
  block-size: 6rem;
  background-color: gainsboro;
}

.fill {
  object-fit: fill;
}

.contain {
  object-fit: contain;
}

.cover {
  object-fit: cover;
}

.none {
  object-fit: none;
}