@import '../constants/dimensions'; .grid, .grid--v { display: flex; flex-wrap: nowrap; justify-content: center; align-items: stretch; align-content: stretch; overflow: auto; box-sizing: border-box; &.grid--center { align-items: center; } &.grid--start { justify-content: flex-start; } &.grid--end { justify-content: flex-end; } & > .grid__cell { overflow: auto; flex: 1 1 100%; box-sizing: border-box; } } .grid { max-width: 100%; flex-direction: row; } .grid--v { max-height: 100%; flex-direction: column; } @media (max-width: $breakpoint-md) { .grid.grid-collapse { display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: stretch; align-content: flex-start; height: 100%; width: 100%; box-sizing: border-box; & > .col { display: block; flex: 1 1 auto; height: 100%; box-sizing: border-box; } } }