-
Notifications
You must be signed in to change notification settings - Fork 31
/
example-grids.html
302 lines (272 loc) · 14.9 KB
/
example-grids.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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html class="dev--highlight-grids dev--highlight-elements dev--show-breakpoint">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>***YOUR-TITLE-HERE***</title>
<!-- Styles -->
<link rel="stylesheet" href="css/screen.css">
<!-- Canonical Meta -->
<link rel="canonical" href="**YOUR-URL-HERE***">
<!-- Viewport Meta-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- SEO Meta -->
<meta name="description" content="***YOUR-CONTENT-HERE-***">
<meta name="keywords" content="***YOUR-CONTENT-HERE-***">
<meta name="robots" content="INDEX,FOLLOW">
<!-- Favicons -->
<link rel="shortcut icon" type="image/ico" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon-precomposed.png">
<meta name="apple-mobile-web-app-title" content="Unsung">
<!-- Facebook -->
<meta property="og:image" content="***YOUR-URUL-HERE-***/images/avatar.png">
<meta property="og:title" content="***YOUR-TITLE-HERE-***">
<meta property="og:site_name" content="***YOUR-SITE'S-NAME-HERE-***">
<meta property="og:url" content="***YOUR-URL-HERE-***">
<meta property="og:description" content="***YOUR-CONTENT-HERE-***">
<!-- Windows 8 Pin app to start screen -->
<meta name="msapplication-TileColor" content="#272727">
<meta name="msapplication-TileImage" content="***YOUR-URL-HERE-***/apple-touch-icon-precomposed.png">
</head>
<body>
<div class="site">
<header class="site-header" role="banner">
<div class="container">
<a class="branding" href="index.html">
<img class="branding__logo" src="images/fpo-logo.png" alt="Site Name">
<h1 class="branding__wordmark">Site Name</h1>
</a>
<nav class="site-nav">
<a href="index.html">Home</a>
<a href="example-grids.html">Grids</a>
<a href="example-modules.html">Modules</a>
<a href="example-forms.html">Forms</a>
<a href="http://skyline.is">Skyline</a>
</nav>
</div>
</header>
<main class="site-main" role="main">
<section class="block--ends container">
<h1>Skyline uses a simple, but powerful responsive grid system.</h1>
<ol>
<li>Grid layout is achieved by using a wrapping div called a 'grid-wrapper', and shortened to the classname <code>.gw</code>.</li>
<li>Within the grid-wrapper, grid units are added, and shortened to the classname <code>.g</code>.</li>
<li>These grid units then have responsive classnames added to them, which specify their widths at different viewports.</li>
<li>Responsive width classes start with a two-letter prefix (xs, sm, md, lg, xl) and follow with the width, written in easy-to-read fractions (one-half, two-thirds, seven-elevenths, etc.).
</ol>
<p><em>NOTE: The HTML element on this page has the classes <code>.dev--highlight-elements .dev--highlight-grids .dev--show-breakpoint</code> from <code>base/_dev-helpers.scss</code>. These enable some helper classes that highlight elements at breakpoints</em></p>
</section>
<section class="block container">
<h1>A basic grid example</h1>
<p>Each grid unit below has the following classes: <code>sm-one-half md-one-third lg-one-sixth xl-one-twelfth</code>. These classes determine the grid unit's width at these viewports:</p>
<ul>
<li><b>Default</b>: grid units are 100%</li>
<li><b class="sm-highlight">At SM</b>: one-half</li>
<li><b class="md-highlight">At MD</b>: one-third</li>
<li><b class="lg-highlight">At LG</b>: one-sixth</li>
<li><b class="xl-highlight">At XL</b>: one-twelfth</li>
</ul>
<div class="gw">
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
</div>
</section>
<section class="block container">
<h1>An example of a grid units with unique sizes</h1>
<p>The grid units below use different combinations of responsive width classes for a more complex grid.</p>
<div class="gw">
<div class="g sm-one-whole md-one-half lg-one-third xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-half lg-one-third xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-third xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-whole md-one-third lg-one-fifth xl-three-twelfths"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-three-fifths xl-three-twelfths"><div class="gx"></div></div>
<div class="g sm-one-half md-one-half lg-one-fifth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-whole md-one-half lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-twelfth"><div class="gx"></div></div>
<div class="g sm-one-half md-one-third lg-one-sixth xl-one-eighth"><div class="gx"></div></div>
<div class="g sm-one-whole md-one-third lg-one-sixth xl-three-eighths"><div class="gx"></div></div>
<div class="g sm-one-half md-one-half lg-one-sixth xl-three-eighths"><div class="gx"></div></div>
<div class="g sm-one-half md-one-half lg-one-sixth xl-one-eighth"><div class="gx"></div></div>
</div>
</section>
<section class="block container">
<h1>An example of a ludicrous grid</h1>
<p>Just to illustrate the flexibility of this grid system, here's an example of a ludicrously complex grid.</p>
<div class="gw">
<div class="g xs-one-whole sm-one-third md-one-seventh lg-one-twelfth xl-one-twelfth"><div class="gx"></div></div>
<div class="g xs-one-third sm-two-thirds md-one-seventh lg-five-twelfths xl-one-twelfth"><div class="gx"></div></div>
<div class="g xs-two-thirds sm-one-whole md-three-sevenths lg-one-half xl-one-twelfth"><div class="gx"></div></div>
<div class="g xs-one-half sm-one-fourth md-one-seventh lg-one-sixth xl-one-half"><div class="gx"></div></div>
<div class="g xs-one-half sm-one-half md-one-seventh lg-four-sixths xl-three-twelfths"><div class="gx"></div></div>
<div class="g xs-one-fourth sm-one-eighth md-one-half lg-one-twelfth xl-two-eighths"><div class="gx"></div></div>
<div class="g xs-one-half sm-one-eighth md-one-half lg-one-twelfth xl-one-eighth"><div class="gx"></div></div>
<div class="g xs-one-fourth sm-one-sixth md-three-eighths lg-one-eleventh xl-five-eighths"><div class="gx"></div></div>
<div class="g xs-one-sixth sm-three-sixths md-two-eighths lg-five-elevenths xl-one-whole"><div class="gx"></div></div>
<div class="g xs-two-sixths sm-two-sixths md-three-eighths lg-five-elevenths xl-one-half"><div class="gx"></div></div>
<div class="g xs-one-sixth sm-one-half md-one-ninth lg-one-half xl-one-eighth"><div class="gx"></div></div>
<div class="g xs-two-sixths sm-six-twelfths md-eight-ninths lg-one-half xl-three-eighths"><div class="gx"></div></div>
</div>
</section>
<section class="block container">
<h1>Grid example using ups</h1>
<p>For a grid wrap containing equally-sized grid units, like a gallery of thumbnails for instance, use the responsive ups classes from <code>layout/_ups.scss</code>. With these classes applied to the .grid wrapper, you won't need to specify widths on each individual grid unit.</p>
<ul>
<li><b>Default</b>: 100%</li>
<li><b class="xs-highlight">At XS</b>: two-up</li>
<li><b class="sm-highlight">At SM</b>: three-up</li>
<li><b class="md-highlight">At MD</b>: four-up</li>
<li><b class="lg-highlight">At LG</b>: six-up</li>
<li><b class="xl-highlight">At XL</b>: twelve-up</li>
</ul>
<div class="gw xs-two-up sm-three-up md-four-up lg-six-up xl-twelve-up">
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
<div class="g"><div class="gx"></div></div>
</div>
</section>
<section class="block container">
<h1>A nested grid example</h1>
<p>Grids can be nested within grids</p>
<div class="gw">
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-third"><div class="gx"></div></div>
<div class="g sm-one-third"><div class="gx"></div></div>
<div class="g sm-one-third"><div class="gx"></div></div>
</div>
</div>
</div>
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half"><div class="gx"></div></div>
<div class="g sm-one-half"><div class="gx"></div></div>
</div>
</div>
</div>
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-fourth"><div class="gx"></div></div>
<div class="g sm-one-fourth"><div class="gx"></div></div>
<div class="g sm-one-fourth"><div class="gx"></div></div>
<div class="g sm-one-fourth"><div class="gx"></div></div>
</div>
</div>
</div>
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-fifth"><div class="gx"></div></div>
<div class="g sm-one-fifth"><div class="gx"></div></div>
<div class="g sm-one-fifth"><div class="gx"></div></div>
<div class="g sm-one-fifth"><div class="gx"></div></div>
<div class="g sm-one-fifth"><div class="gx"></div></div>
</div>
</div>
</div>
</div>
</section>
<section class="block container">
<h1>A double-nested grid example</h1>
<p>It's unusual, but sure - you can nest a nested grid.</p>
<div class="gw">
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half">
<div class="gx"></div>
</div>
<div class="g sm-one-half">
<div class="gx"></div>
</div>
</div>
</div>
</div>
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half">
<div class="gx"></div>
</div>
<div class="g sm-one-half">
<div class="gx"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half">
<div class="gx"></div>
</div>
<div class="g sm-one-half">
<div class="gx"></div>
</div>
</div>
</div>
</div>
<div class="g sm-one-half">
<div class="gx">
<div class="gw">
<div class="g sm-one-half">
<div class="gx"></div>
</div>
<div class="g sm-one-half">
<div class="gx"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<footer class="site-footer">
<div class="container">
<a class="branding" href="/">Site Name</a>
<nav class="site-nav">
<a href="index.html">Home</a>
<a href="example-grids.html">Grids</a>
<a href="example-modules.html">Modules</a>
<a href="example-forms.html">Forms</a>
<a href="http://skyline.is">Skyline</a>
</nav>
<small class="site-credits">© 2014 Site Name</small>
</div>
</footer>
</div><!--/.site-->
</body>
</html>