insomnia/app/css/components/grid.scss
2016-04-09 12:10:34 -07:00

65 lines
940 B
SCSS

@import '../constants/dimensions';
.grid,
.grid--v {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: stretch;
align-content: center;
&.grid--center {
align-items: center;
align-content: center;
}
&.grid--start {
justify-content: flex-start;
}
&.grid--end {
justify-content: flex-end;
}
& > .grid__cell {
display: flex;
flex: 1 1 100%;
box-sizing: border-box;
&.grid__cell--no-flex {
flex-shrink: 0;
flex-grow: 0;
}
}
}
.grid {
max-width: 100%;
flex-direction: row;
& > .grid__cell {
// So the cells are equal width
width: 100%;
}
}
.grid--v {
max-height: 100%;
flex-direction: column;
& > .grid__cell {
// So the cells are equal height
height: 100%;
}
}
@media (max-width: $breakpoint-md) {
.grid.grid--collapse {
flex-direction: column;
& > .grid__cell {
height: 100%;
}
}
}