1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-14 17:15:18 +01:00
blog/_src/_assets/styl/grid.styl

214 lines
3.3 KiB
Stylus
Raw Normal View History

2014-07-12 02:00:18 +02:00
//
// kremalicious3
// --------------
// Grid
//
2015-08-10 00:48:31 +02:00
*,
*:before,
*:after
2014-07-12 21:22:47 +02:00
box-sizing: border-box
2014-07-12 02:00:18 +02:00
2015-08-10 00:48:31 +02:00
//
// Base
//
2015-08-09 21:50:06 +02:00
.grid
display: flex
flex-wrap: wrap
2015-08-10 00:48:31 +02:00
list-style: none
margin: 0
padding: 0
2014-07-12 02:00:18 +02:00
2015-08-10 00:48:31 +02:00
.grid__col
flex: 1
2014-07-12 02:00:18 +02:00
2015-08-10 00:48:31 +02:00
//
// Alignment per row
//
.grid--top
align-items: flex-start
.grid--bottom
align-items: flex-end
.grid--center
align-items: center
2015-08-19 10:04:02 +02:00
.grid--justifycenter
justify-content: center
2015-08-10 00:48:31 +02:00
//
// Alignment per cell
//
2015-08-19 10:04:02 +02:00
.grid__col--top
2015-08-10 00:48:31 +02:00
align-self: flex-start
2015-08-19 10:04:02 +02:00
.grid__col--bottom
2015-08-10 00:48:31 +02:00
align-self: flex-end
2015-08-19 10:04:02 +02:00
.grid__col--center
2015-08-10 00:48:31 +02:00
align-self: center
//
// Gutters
//
.grid--gutters
margin: -($gutter-space) 0 $gutter-space (-($gutter-space))
> .grid__col
padding: $gutter-space 0 0 $gutter-space
2015-08-19 10:04:02 +02:00
@media $breakpoint1
.grid-small--gutters
margin: -($gutter-space) 0 $gutter-space (-($gutter-space))
> .grid__col
padding: $gutter-space 0 0 $gutter-space
@media $breakpoint2
.grid-medium--gutters
margin: -($gutter-space) 0 $gutter-space (-($gutter-space))
> .grid__col
padding: $gutter-space 0 0 $gutter-space
@media $breakpoint3
.grid-large--gutters
margin: -($gutter-space) 0 $gutter-space (-($gutter-space))
> .grid__col
padding: $gutter-space 0 0 $gutter-space
2015-08-10 00:48:31 +02:00
//
// Columns
//
2015-08-18 22:45:30 +02:00
.grid--fit
2015-08-10 00:48:31 +02:00
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 1
2014-07-12 02:00:18 +02:00
2015-08-18 22:45:30 +02:00
.grid--full
> .grid__col
flex: 0 0 100%
2015-08-10 00:48:31 +02:00
.grid--1of6
> .grid__col
flex: 0 0 16.5%
2015-08-18 20:55:30 +02:00
.grid--2of6,
.grid--third
2015-08-10 00:48:31 +02:00
> .grid__col
flex: 0 0 33%
.grid--3of6,
.grid--half
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 0 0 50%
2015-08-10 00:48:31 +02:00
.grid--4of6
> .grid__col
flex: 0 0 66%
.grid--5of6
> .grid__col
flex: 0 0 82.5%
2015-08-18 20:55:30 +02:00
@media $breakpoint1
2015-08-18 22:45:30 +02:00
.grid-small--fit
> .grid__col
flex: 1
.grid-small--full
> .grid__col
flex: 0 0 100%
2015-08-18 20:55:30 +02:00
.grid-small--1of6
> .grid__col
flex: 0 0 16.5%
.grid-small--2of6,
.grid-small--third
> .grid__col
flex: 0 0 33%
.grid-small--3of6,
.grid-small--half
> .grid__col
flex: 0 0 50%
.grid-small--4of6
> .grid__col
flex: 0 0 66%
.grid-small--5of6
> .grid__col
flex: 0 0 82.5%
2015-08-10 00:48:31 +02:00
@media $breakpoint2
2015-08-18 22:45:30 +02:00
.grid-medium--fit
> .grid__col
flex: 1
.grid-medium--full
> .grid__col
flex: 0 0 100%
2015-08-10 00:48:31 +02:00
.grid-medium--1of6
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 0 0 16.5%
2015-08-10 00:48:31 +02:00
2015-08-18 20:55:30 +02:00
.grid-medium--2of6,
.grid-medium--third
2015-08-10 00:48:31 +02:00
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 0 0 33%
2015-08-10 00:48:31 +02:00
.grid-medium--3of6,
.grid-medium--half
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 0 0 50%
2015-08-10 00:48:31 +02:00
.grid-medium--4of6
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 0 0 66%
2015-08-10 00:48:31 +02:00
.grid-medium--5of6
> .grid__col
flex: 0 0 82.5%
@media $breakpoint3
2015-08-18 22:45:30 +02:00
.grid-large--fit
> .grid__col
flex: 1
.grid-large--full
> .grid__col
flex: 0 0 100%
2015-08-10 00:48:31 +02:00
.grid-large--1of6
> .grid__col
flex: 0 0 16.5%
2015-08-18 20:55:30 +02:00
.grid-large--2of6,
.grid-large--third
2015-08-10 00:48:31 +02:00
> .grid__col
flex: 0 0 33%
.grid-large--3of6,
.grid-large--half
> .grid__col
flex: 0 0 50%
.grid-large--4of6
> .grid__col
flex: 0 0 66%
.grid-large--5of6
> .grid__col
2015-08-09 21:50:06 +02:00
flex: 0 0 82.5%