forked from thinkful-c11/SpaAppNaeemSonja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfloat-grid.css
75 lines (64 loc) · 1.14 KB
/
float-grid.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
* {
box-sizing: border-box;
}
/* Grid measurements:
*
* 960px wide including 12 gutters (half gutters on both edges)
*
* 60px columns (12)
* 20px gutters (two half-gutters + 11 full gutters, so 12 total)
*
*
* For smaller screens, we always want 20px of padding on either side,
* so 960 + 20 + 20 => 1000px
*
**/
.row {
max-width: 1000px;
/*padding-left: 20px;
padding-right: 20px;*/
margin: 0 auto;
}
/* Clearfix */
.row::before,
.row::after {
display: table;
content: '';
}
.row::after {
clear: both;
}
.col-3, .col-4, .col-6, .col-12 {
float: left;
/* Gutters:
* Each column is padded by half-a-gutter on each side,
*
* Half a gutter is 10px, 10/960 (context) = 1.041666%
*
*/
padding-left: 1.04166666%;
padding-right: 1.04166666%;
}
/* Mobile defaults */
.col-3, .col-4, .col-6, .col-12 {
width: 100%;
}
/* Non-mobile, grid */
@media only screen and (min-width: 640px) {
/* 3 columns, 3/12 in % */
.col-3 {
width: 25%;
}
/* 4 columns */
.col-4 {
width: 33.33%;
}
/* 6 columns */
.col-6 {
width: 50%;
}
/* 12 columns */
.col-12 {
width: 100%;
}
}