2015-12-20 05:22:45 +01:00
|
|
|
//
|
|
|
|
// Grid
|
|
|
|
// --------------
|
|
|
|
// bigchain.io
|
|
|
|
//
|
|
|
|
// adapted from github.com/kremalicious/kremalicious3/blob/master/_src/_assets/styl/grid.styl
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// More sane box model
|
|
|
|
//
|
|
|
|
*,
|
|
|
|
*:before,
|
|
|
|
*:after {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Base
|
|
|
|
//
|
|
|
|
.grid {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
list-style: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid__col {
|
|
|
|
flex: 1;
|
|
|
|
// Firefox grid fix for whatever reason
|
|
|
|
min-height: 0;
|
|
|
|
min-width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.row {
|
2016-01-17 17:57:55 +01:00
|
|
|
max-width: $screen-md-min;
|
2015-12-20 05:22:45 +01:00
|
|
|
margin: auto;
|
2015-12-21 14:48:45 +01:00
|
|
|
padding-left: $gutter-space;
|
|
|
|
padding-right: $gutter-space;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
2016-01-17 17:57:55 +01:00
|
|
|
.row--wide {
|
|
|
|
max-width: 60rem;
|
|
|
|
}
|
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Alignment per row
|
|
|
|
//
|
|
|
|
.grid--top {
|
|
|
|
align-items: flex-start
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--bottom {
|
|
|
|
align-items: flex-end
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--center {
|
|
|
|
align-items: center
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--justifycenter {
|
|
|
|
justify-content: center
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Alignment per cell
|
|
|
|
//
|
|
|
|
.grid__col--top {
|
|
|
|
align-self: flex-start
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid__col--bottom {
|
|
|
|
align-self: flex-end
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid__col--center {
|
|
|
|
align-self: center
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Gutters
|
|
|
|
//
|
2016-01-30 13:56:00 +01:00
|
|
|
@mixin grid-gutters() {
|
2015-12-20 05:22:45 +01:00
|
|
|
margin: -($gutter-space) 0 $gutter-space (-($gutter-space));
|
|
|
|
|
|
|
|
> .grid__col {
|
|
|
|
padding: $gutter-space 0 0 $gutter-space;;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid--gutters{
|
|
|
|
@include grid-gutters();
|
|
|
|
}
|
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
@media ($screen-sm) {
|
|
|
|
.grid-small--gutters {
|
2016-01-30 13:56:00 +01:00
|
|
|
@include grid-gutters();
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-md) {
|
|
|
|
.grid-medium--gutters {
|
2016-01-30 13:56:00 +01:00
|
|
|
@include grid-gutters();
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-lg) {
|
|
|
|
.grid-large--gutters {
|
2016-01-30 13:56:00 +01:00
|
|
|
@include grid-gutters();
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Columns
|
|
|
|
//
|
2016-01-30 13:56:00 +01:00
|
|
|
@mixin grid-columns() {
|
|
|
|
> .grid__col {
|
|
|
|
&.grid__col--1 { flex: 0 0 16%; }
|
|
|
|
&.grid__col--2 { flex: 0 0 33%; }
|
|
|
|
&.grid__col--3 { flex: 0 0 50%; }
|
|
|
|
&.grid__col--4 { flex: 0 0 66%; }
|
|
|
|
&.grid__col--5 { flex: 0 0 84%; }
|
|
|
|
&.grid__col--6 { flex: 0 0 100%; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid--fit {
|
|
|
|
> .grid__col { flex: 1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--full {
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--third {
|
|
|
|
> .grid__col { flex: 0 0 33%; }
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--half {
|
|
|
|
> .grid__col { flex: 0 0 50%; }
|
|
|
|
}
|
|
|
|
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid--columns {
|
|
|
|
@include grid-columns();
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-sm) {
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid-small--columns {
|
|
|
|
@include grid-columns();
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-small--fit {
|
|
|
|
> .grid__col { flex: 1; }
|
|
|
|
}
|
|
|
|
.grid-small--full{
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
|
|
|
.grid-small--third {
|
|
|
|
> .grid__col { flex: 0 0 33%; }
|
|
|
|
}
|
|
|
|
.grid-small--half {
|
|
|
|
> .grid__col { flex: 0 0 50%; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-md) {
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid-medium--columns {
|
|
|
|
@include grid-columns();
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-medium--fit {
|
|
|
|
> .grid__col { flex: 1 }
|
|
|
|
}
|
|
|
|
.grid-medium--full {
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
|
|
|
.grid-medium--third {
|
|
|
|
> .grid__col { flex: 0 0 33%; }
|
|
|
|
}
|
|
|
|
.grid-medium--half {
|
|
|
|
> .grid__col { flex: 0 0 50%; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-lg) {
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid-large--columns {
|
|
|
|
@include grid-columns();
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-large--fit {
|
|
|
|
> .grid__col { flex: 1; }
|
|
|
|
}
|
|
|
|
.grid-large--full {
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
|
|
|
.grid-large--third {
|
|
|
|
> .grid__col { flex: 0 0 33%; }
|
|
|
|
}
|
|
|
|
.grid-large--half {
|
|
|
|
> .grid__col { flex: 0 0 50%; }
|
|
|
|
}
|
|
|
|
}
|