-
Notifications
You must be signed in to change notification settings - Fork 64
/
_grid.scss
108 lines (93 loc) · 2.56 KB
/
_grid.scss
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
Grids
You create the grid with `.grid-layout` and individual columns with a column class `.grid-layout__column` and
fraction class `.grid-layout__column--1-4`.
* Add a `.grid-layout` container.
* Add your columns with individual `.grid-layout__column`.
* Add your fractional width classes to set the width of the columns e.g. `.grid-layout__column--1-4`.
* IMPORTANT: To avoid clashing with other components that may have layout properties, do not place other component classes on the same element as `.grid-layout`.
Markup:
<div class="grid-layout {{modifier_class}}">
<div class="grid-layout__column grid-layout__column--1-4">
.grid-layout__column--1-4
</div>
<div class="grid-layout__column grid-layout__column--3-4">
.grid-layout__column--3-4
</div>
</div>
<div class="grid-layout {{modifier_class}}">
<div class="grid-layout__column grid-layout__column--1-3">
.grid-layout__column--1-3
</div>
<div class="grid-layout__column grid-layout__column--2-3">
.grid-layout__column--2-3
</div>
</div>
<div class="grid-layout {{modifier_class}}">
<div class="grid-layout__column grid-layout__column--1-2">
.grid-layout__column--1-2
</div>
<div class="grid-layout__column grid-layout__column--1-2">
.grid-layout__column--1-2
</div>
</div>
.grid-layout--no-gutter - Removes edge gutters to allow horizontal alignment with neighbouring content
.grid-layout--stacked - Stack columns in mobile
.grid-layout--maintain-width - Maintain half width columns on mobile
Styleguide Layout.Grid
*/
.grid-layout {
@extend %grid-row-table;
}
.grid-layout--no-gutter {
margin-left: 0;
margin-right: 0;
}
.grid-layout--stacked {
@include media(mobile) {
.grid-layout__column {
display: block;
}
}
}
.grid-layout--maintain-width {
@include media(mobile) {
display: table;
float: left;
.grid-layout__column--1-2 {
width: $half;
}
.grid-layout__column--1-4 {
width: $one-quarter;
}
.grid-layout__column--3-4 {
width: $three-quarters;
}
.grid-layout__column--1-3 {
width: $one-third;
}
.grid-layout__column--2-3 {
width: $two-thirds;
}
}
}
.grid-layout__column {
vertical-align: top;
display: table-cell;
width: 100%;
}
.grid-layout__column--1-4 {
@include grid-column-table(1/4);
}
.grid-layout__column--3-4 {
@include grid-column-table(3/4);
}
.grid-layout__column--1-2 {
@include grid-column-table(1/2);
}
.grid-layout__column--1-3 {
@include grid-column-table(1/3);
}
.grid-layout__column--2-3 {
@include grid-column-table(2/3);
}