-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
271 lines (271 loc) · 11.3 KB
/
index.html
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js ie"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<title>Responsive Grids</title>
<!--[if (gt IE 8) | (IEMobile)]><!-->
<link href="dest/css/styles.css" rel="stylesheet" type="text/css" />
<!--<![endif]-->
<!--[if (lt IE 9) & (!IEMobile)]>
<link rel='stylesheet' id='ie-only-css' href='dest/css/ie.css' />
<![endif]-->
</head>
<body>
<a href="https://github.com/Quirksmode/responsive-grids"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<main class="page page-home">
<header>
<div class="grid-fullwidth no-cols">
<h1>Responsive Grids</h1>
<p class="intro">I know, I know another Grid system, but bear with us, this one is pretty cool and we have been using it on all our large scale projects at Beyond for the last few years and thought it was time to share.</p>
</div>
</header>
<section>
<div class="grid-fullwidth no-cols">
<h2>12 Column grid example</h2>
<p>A basic 12 column example</p>
</div>
<div class="grid-fullwidth">
<div class="col-1-1">1 of 1</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-8-12">8 of 12</div>
<div class="col-4-12">4 of 12</div>
<div class="col-9-12">9 of 12</div>
<div class="col-3-12">3 of 12</div>
</div>
<div class="grid-fullwidth no-cols code-wrap">
<h3>SCSS</h3>
<pre><code class="language-scss">
@include rg-create-grid(
$grid-class: "grid-fullwidth",
$width: 1280px,
$gutter: 20px,
$margin: 24px,
$columns: 12,
$breakpoint: "tablet"
);
</code>
</pre>
<h3>HTML</h3>
<pre><code class="language-markup">
<div class="grid-fullwidth">
<div class="col-1-1">1 of 1</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-8-12">8 of 12</div>
<div class="col-4-12">4 of 12</div>
<div class="col-9-12">9 of 12</div>
<div class="col-3-12">3 of 12</div>
</div>
</code>
</pre>
</div>
</section>
<section>
<div class="grid-custom no-cols">
<h2>Custom grid example</h2>
<p>A custom grid allows you handcraft exactly how each column will behave across the different breakpoints.</p>
</div>
<div class="grid-custom">
<div class="grid-custom__col">Custom 1</div>
<div class="grid-custom__col">Custom 2</div>
<div class="grid-custom__col">Custom 3</div>
<div class="grid-custom__col">Custom 4</div>
<div class="grid-custom__col">Custom 5</div>
<div class="grid-custom__col">Custom 6</div>
</div>
<div class="grid-fullwidth no-cols code-wrap">
<h3>SCSS</h3>
<pre><code class="language-scss">
@include rg-create-grid(
$grid-class: "grid-custom",
$width: 1280px,
$gutter: 20px,
$margin: 24px,
$column-class: "grid-custom__col",
$breakpoint: ((tablet 2)
(smalldesktop 3)
(desktop 4)
(largedesktop 6))
);
</code>
</pre>
<h3>HTML</h3>
<pre><code class="language-markup">
<div class="grid-custom">
<div class="grid-custom__col">Custom 1</div>
<div class="grid-custom__col">Custom 2</div>
<div class="grid-custom__col">Custom 3</div>
<div class="grid-custom__col">Custom 4</div>
<div class="grid-custom__col">Custom 5</div>
<div class="grid-custom__col">Custom 6</div>
</div>
</code>
</pre>
</div>
</section>
<section>
<div class="grid-fullwidth no-cols">
<h2>Single column content example</h2>
<p>This example shows how we can use a 'no-cols' class to avoid needing to wrap the content in a div 'col-1-1' class when the content spans one single column.</p>
</div>
<div class="grid-fullwidth no-cols">
<p class="example">Full width content example</p>
</div>
<div class="grid-fullwidth no-cols code-wrap">
<h3>SCSS</h3>
<pre><code class="language-scss">
@include rg-create-grid(
$grid-class: "grid-fullwidth",
$width: 1280px,
$gutter: 20px,
$margin: 24px,
$columns: 12,
$breakpoint: "tablet"
);
</code>
</pre>
<h3>HTML</h3>
<pre><code class="language-markup">
<div class="grid-fullwidth no-cols">
<p>Example full width content</p>
</div>
</code>
</pre>
</div>
</section>
<section>
<div class="grid-fullwidth no-cols">
<h2>Full bleed 4 Column grid example with no gutters or margins</h2>
<p>A 12 column example with the gutters and margins removed</p>
</div>
<div class="grid-nogaps">
<div class="col-1-1">1 of 1</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
</div>
<div class="grid-fullwidth no-cols code-wrap">
<h3>SCSS</h3>
<pre><code class="language-scss">
@include rg-create-grid(
$grid-class: "grid-nogaps",
$width: 1280px,
$gutter: 0px,
$margin: 0px,
$columns: 4,
$breakpoint: "tablet"
);
</code>
</pre>
<h3>HTML</h3>
<pre><code class="language-markup">
<div class="grid-nogaps">
<div class="col-1-1">1 of 1</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-2">1 of 2</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-3">1 of 3</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
<div class="col-1-4">1 of 4</div>
</div>
</code>
</pre>
</div>
</section>
<section>
<div class="grid-fullwidth no-cols">
<h2>Custom align the columns</h2>
<p>An 8 column example with alternate width, margin and gutters plus custom alignment</p>
</div>
<div class="example-wrap">
<div class="grid-smaller">
<div class="col-1-1">1 of 1</div>
</div>
<div class="grid-smaller">
<div class="col-1-2">1 of 2</div>
<div class="col-1-2">1 of 2</div>
</div>
<div class="grid-smaller">
<div class="col-6-8">1 of 2</div>
<div class="col-1-8 a-r">1 of 8</div>
</div>
<div class="grid-smaller">
<div class="col-1-1">1 of 3</div>
</div>
<div class="grid-smaller">
<div class="col-1-4 a-c">1 of 4</div>
</div>
<div class="grid-smaller">
<div class="col-6-8 a-r">6 of 8</div>
</div>
</div>
<div class="grid-fullwidth no-cols code-wrap">
<h3>SCSS</h3>
<pre><code class="language-scss">
@include rg-create-grid(
$grid-class: "grid-smaller",
$width: 1000px,
$gutter: 30px,
$margin: 12px,
$columns: 8,
$breakpoint: "smalldesktop"
);
</code>
</pre>
<h3>HTML</h3>
<pre><code class="language-markup">
<div class="grid-smaller">
<div class="col-1-1">1 of 1</div>
</div>
<div class="grid-smaller">
<div class="col-1-2">1 of 2</div>
<div class="col-1-2">1 of 2</div>
</div>
<div class="grid-smaller">
<div class="col-6-8">1 of 2</div>
<div class="col-1-8 a-r">1 of 8</div>
</div>
<div class="grid-smaller">
<div class="col-1-1">1 of 3</div>
</div>
<div class="grid-smaller">
<div class="col-1-4 a-c">1 of 4</div>
</div>
<div class="grid-smaller">
<div class="col-6-8 a-r">6 of 8</div>
</div>
</code>
</pre>
</div>
</section>
</main>
<script src="dest/js/prism.js"></script>
</body>
</html>