insomnia/app/css/components/grid.scss

62 lines
985 B
SCSS
Raw Normal View History

2016-03-23 05:26:27 +00:00
@import '../constants/dimensions';
2016-03-16 05:49:42 +00:00
2016-04-05 20:49:28 +00:00
.grid,
.grid--v {
2016-03-16 05:49:42 +00:00
display: flex;
flex-wrap: nowrap;
2016-03-16 23:34:25 +00:00
justify-content: center;
2016-04-05 20:49:28 +00:00
align-items: stretch;
align-content: stretch;
overflow: auto;
2016-03-16 20:02:47 +00:00
box-sizing: border-box;
2016-03-16 05:49:42 +00:00
2016-04-05 20:49:28 +00:00
&.grid--center {
align-items: center;
}
&.grid--start {
2016-04-05 05:35:21 +00:00
justify-content: flex-start;
}
2016-04-05 20:49:28 +00:00
&.grid--end {
2016-04-05 05:35:21 +00:00
justify-content: flex-end;
}
2016-04-05 20:49:28 +00:00
& > .grid__cell {
overflow: auto;
flex: 1 1 100%;
2016-03-21 05:47:49 +00:00
box-sizing: border-box;
}
2016-04-05 20:49:28 +00:00
}
2016-03-23 17:15:19 +00:00
2016-04-05 20:49:28 +00:00
.grid {
max-width: 100%;
flex-direction: row;
2016-03-16 05:49:42 +00:00
}
2016-04-05 20:49:28 +00:00
.grid--v {
max-height: 100%;
2016-03-16 20:02:47 +00:00
flex-direction: column;
2016-03-16 05:49:42 +00:00
}
2016-03-20 04:00:40 +00:00
2016-03-21 05:47:49 +00:00
@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;
}
}
}