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

79 lines
1.1 KiB
Stylus
Raw Normal View History

2014-07-12 02:00:18 +02:00
//
// kremalicious3
// --------------
// Grid
//
// Prevents padding to be added
*
2014-07-12 21:22:47 +02:00
box-sizing: border-box
2014-07-12 02:00:18 +02:00
// 320px and up
.container
2014-07-12 21:22:47 +02:00
padding: 0 7%
width: 100%
2014-07-12 02:00:18 +02:00
.row
2014-07-12 21:22:47 +02:00
margin-top: $line-height-computed
margin-bottom: $line-height-computed
2014-07-12 02:00:18 +02:00
.col1,
.col2,
.col3,
.col4,
.col5,
.col6
2014-07-12 21:22:47 +02:00
width: 100%
margin-left: 0
// ensures empty columns won't collapse
min-height: 1px
2014-07-12 02:00:18 +02:00
// clear
.container,
.row
@extend .clearfix
@media $breakpoint2
.container
padding: 0 15%
2014-07-12 21:22:47 +02:00
.row
max-width: 35em
margin: ($line-height-computed*2) auto
padding-left: 0
padding-right: 0
2014-07-12 02:00:18 +02:00
2014-07-12 21:22:47 +02:00
.col1,
.col2,
.col3,
.col4,
.col5,
.col6
float: left
margin-left: 4%
2014-07-12 02:00:18 +02:00
2014-07-12 21:22:47 +02:00
.col1:first-child,
.col2:first-child,
.col3:first-child,
.col4:first-child,
.col5:first-child,
.col6,
2014-07-12 02:00:18 +02:00
.col3:nth-child(2n+3),
.col2:nth-child(3n+4),
.col1:nth-child(6n+7)
margin-left: 0
clear: both
2014-07-12 21:22:47 +02:00
.col1
2014-07-12 02:00:18 +02:00
width: 13%
2014-07-12 21:22:47 +02:00
.col2
2014-07-12 02:00:18 +02:00
width: 30.6%
2014-07-12 21:22:47 +02:00
.col3
2014-07-12 02:00:18 +02:00
width: 48%
2014-07-12 21:22:47 +02:00
.col4
2014-07-12 02:00:18 +02:00
width: 65%
2014-07-12 21:22:47 +02:00
.col5
2014-07-12 02:00:18 +02:00
width: 82%
2014-07-12 21:22:47 +02:00
.col6
2014-07-12 02:00:18 +02:00
width: 100%