2015-12-20 05:22:45 +01:00
|
|
|
//
|
|
|
|
// Grid
|
|
|
|
// --------------
|
2017-05-29 21:15:48 +02:00
|
|
|
// bigchaindb.com
|
2015-12-20 05:22:45 +01:00
|
|
|
//
|
|
|
|
// 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 {
|
2017-05-18 19:33:14 +02:00
|
|
|
max-width: calc(50em - #{$gutter-space * 2});
|
2017-03-02 14:27:08 +01:00
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
2016-02-01 16:37:58 +01:00
|
|
|
padding-left: ($gutter-space / 2);
|
|
|
|
padding-right: ($gutter-space / 2);
|
|
|
|
|
|
|
|
@media ($screen-sm) {
|
|
|
|
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 {
|
2016-11-14 11:59:16 +01:00
|
|
|
max-width: 70rem;
|
2016-01-17 17:57:55 +01:00
|
|
|
}
|
|
|
|
|
2016-02-14 00:16:24 +01:00
|
|
|
.row--narrow {
|
|
|
|
max-width: ($screen-md-min / 1.75);
|
|
|
|
}
|
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Alignment per row
|
|
|
|
//
|
|
|
|
.grid--top {
|
2017-05-31 00:22:14 +02:00
|
|
|
align-items: flex-start;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.grid--bottom {
|
2017-05-31 00:22:14 +02:00
|
|
|
align-items: flex-end;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.grid--center {
|
2017-05-31 00:22:14 +02:00
|
|
|
align-items: center;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.grid--justifycenter {
|
2017-05-31 00:22:14 +02:00
|
|
|
justify-content: center;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Alignment per cell
|
|
|
|
//
|
|
|
|
.grid__col--top {
|
2017-05-31 00:22:14 +02:00
|
|
|
align-self: flex-start;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.grid__col--bottom {
|
2017-05-31 00:22:14 +02:00
|
|
|
align-self: flex-end;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.grid__col--center {
|
2017-05-31 00:22:14 +02:00
|
|
|
align-self: center;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// 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 {
|
2017-05-31 00:22:14 +02:00
|
|
|
padding: $gutter-space 0 0 $gutter-space;
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-06 11:18:37 +02:00
|
|
|
@mixin grid-gutters-small() {
|
|
|
|
margin: -($gutter-space / 3) 0 $gutter-space / 3 (-($gutter-space / 3));
|
|
|
|
|
|
|
|
> .grid__col {
|
|
|
|
padding: $gutter-space / 3 0 0 $gutter-space / 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-31 00:22:14 +02:00
|
|
|
.grid--gutters {
|
2016-01-30 13:56:00 +01:00
|
|
|
@include grid-gutters();
|
|
|
|
}
|
|
|
|
|
2018-04-06 11:18:37 +02:00
|
|
|
.grid--gutters--small {
|
|
|
|
@include grid-gutters-small();
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
2018-04-06 11:18:37 +02:00
|
|
|
|
|
|
|
.grid-small--gutters--small {
|
|
|
|
@include grid-gutters-small();
|
|
|
|
}
|
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
|
|
|
}
|
2018-04-06 11:18:37 +02:00
|
|
|
|
|
|
|
.grid-medium--gutters--small {
|
|
|
|
@include grid-gutters-small();
|
|
|
|
}
|
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
|
|
|
}
|
2018-04-06 11:18:37 +02:00
|
|
|
|
|
|
|
.grid-large--gutters--small {
|
|
|
|
@include grid-gutters-small();
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Columns
|
|
|
|
//
|
2016-01-30 13:56:00 +01:00
|
|
|
@mixin grid-columns() {
|
|
|
|
> .grid__col {
|
2017-04-12 17:33:49 +02:00
|
|
|
max-width: none;
|
|
|
|
|
2016-01-30 13:56:00 +01:00
|
|
|
&.grid__col--1 { flex: 0 0 16%; }
|
2017-08-22 00:50:41 +02:00
|
|
|
&.grid__col--2 { flex: 0 0 25%; }
|
2016-01-30 13:56:00 +01:00
|
|
|
&.grid__col--3 { flex: 0 0 50%; }
|
2017-08-22 00:50:41 +02:00
|
|
|
&.grid__col--4 { flex: 0 0 75%; }
|
2016-01-30 13:56:00 +01:00
|
|
|
&.grid__col--5 { flex: 0 0 84%; }
|
|
|
|
&.grid__col--6 { flex: 0 0 100%; }
|
2017-08-22 12:58:59 +02:00
|
|
|
|
|
|
|
&.grid__col--2-3 { flex: 0 0 (100% / 1.5); }
|
|
|
|
&.grid__col--1-3 { flex: 0 0 (100% / 3); }
|
2016-01-30 13:56:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid--fit {
|
|
|
|
> .grid__col { flex: 1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--full {
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid--third {
|
2016-02-08 16:14:23 +01:00
|
|
|
> .grid__col { flex: 0 0 33.3%; }
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.grid--half {
|
2016-12-07 11:49:14 +01:00
|
|
|
> .grid__col {
|
|
|
|
flex: 0 0 50%;
|
|
|
|
max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box)
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
|
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();
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-small--fit {
|
|
|
|
> .grid__col { flex: 1; }
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
|
|
|
.grid-small--full {
|
2015-12-20 05:22:45 +01:00
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-small--third {
|
2016-02-08 16:14:23 +01:00
|
|
|
> .grid__col { flex: 0 0 33.3%; }
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-small--half {
|
2016-12-07 11:49:14 +01:00
|
|
|
> .grid__col {
|
|
|
|
flex: 0 0 50%;
|
|
|
|
max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box)
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-md) {
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid-medium--columns {
|
|
|
|
@include grid-columns();
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-medium--fit {
|
2017-05-31 00:22:14 +02:00
|
|
|
> .grid__col { flex: 1; }
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-medium--full {
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-medium--third {
|
2016-02-08 16:14:23 +01:00
|
|
|
> .grid__col { flex: 0 0 33.3%; }
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-medium--half {
|
2016-12-07 11:49:14 +01:00
|
|
|
> .grid__col {
|
|
|
|
flex: 0 0 50%;
|
|
|
|
max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box)
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ($screen-lg) {
|
2016-01-30 13:56:00 +01:00
|
|
|
.grid-large--columns {
|
|
|
|
@include grid-columns();
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-large--fit {
|
|
|
|
> .grid__col { flex: 1; }
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-large--full {
|
|
|
|
> .grid__col { flex: 0 0 100%; }
|
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-large--third {
|
2016-02-08 16:14:23 +01:00
|
|
|
> .grid__col { flex: 0 0 33.3%; }
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
2017-05-31 00:22:14 +02:00
|
|
|
|
2015-12-20 05:22:45 +01:00
|
|
|
.grid-large--half {
|
2016-12-07 11:49:14 +01:00
|
|
|
> .grid__col {
|
|
|
|
flex: 0 0 50%;
|
|
|
|
max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box)
|
|
|
|
}
|
2015-12-20 05:22:45 +01:00
|
|
|
}
|
|
|
|
}
|