Spot the bug - #75

Layout bug is hidden in plain sight.

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}
.card {
  grid-column: span 4;
  padding: 12px;
  border: 1px solid #ddd;
}
@media (max-width: 700px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
}

Reply with what is broken and how you would fix it.

Your grid has 3 columns, but . card { grid-column: span 4; } is asking for four. Browsers will happily create an implicit 4th column to satisfy that, which is why you get weird overflow/spacing and “why is this wider than the grid” vibes. Fix is just to stop spanning more tracks than exist (or make the span responsive):

.card { grid-column: span 3; } /* or just remove it */
@media (max-width: 700px) { .card { grid-column: span 1; } }

Mechanism-wise: grid-column: span N doesn’t clamp to your template; it can force implicit tracks, and that’s the kind of “looks fine until one breakpoint” bug that wastes an hour. I found a related kirupa. com article that can help you go deeper into this topic: