-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.html
340 lines (302 loc) · 8.77 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
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>GUFF</title>
<meta name="description" content="Structure Style Guide">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="styles/main.css">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js
"></script>
</head>
<body>
<header class="primary">
<h1>GUFF</h1>
<p>Lets keep this shit simple.</p>
</header>
<main>
<section>
<header>
<h2>CSS Reset Mixin</h2>
</header>
<code class="prettyprint">
@include reset;
</code>
</section>
<section>
<header>
<h2>Breakpoint Mixin</h2>
</header>
<code class="prettyprint">
$desktop: "(min-width: 1024px)";
div {
@include breakpoint($desktop){
width: 100%;
}
}
</code>
<p>Renders the following media query:</p>
<code class="prettyprint">
@media (min-width: 1024px) {
div {
width: 100%;
}
}
</code>
</section>
<section>
<header>
<h2>Container Mixin</h2>
</header>
<code class="prettyprint">
// Use on divs wrapping span mixins
.container {
@include container;
}
</code>
</section>
<section>
<header>
<h2>Span Mixin</h2>
</header>
<code class="prettyprint">
// cols : int - Column count
// padding : boolean - Use grid padding : optional
@include span(cols, padding);
</code>
<div class="container">
<div class="float-tile"></div>
<div class="float-tile"></div>
<div class="float-tile"></div>
</div>
<code class="prettyprint">
// Requires container with clear() mixin
// Use span function to just get width
.tile {
@include span(4);
}
</code>
</section>
<section>
<header>
<h2>Col Mixin</h2>
</header>
<code class="prettyprint">
// Works like span but with margins
// cols : int - Column count
// gutter : boolean - Use grid gutter : optional
@include col(cols, padding);
</code>
<div class="container">
<div class="col-tile"></div>
<div class="col-tile"></div>
<div class="col-tile"></div>
</div>
<code class="prettyprint">
// Requires container with clear() mixin
.col {
@include col(4);
}
</code>
</section>
<section>
<header>
<h2>Offset Mixin</h2>
</header>
<code class="prettyprint">
// cols : int - Column count
@include offset(cols);
</code>
<div class="container">
<div class="float-tile offset-tile">
</div>
</div>
<code class="prettyprint">
.tile.offset-tile {
@include @offset(4);
}
</code>
</section>
<section>
<header>
<h2>Span Function</h2>
</header>
<code class="prettyprint">
// Use to simply get column width
.tile-no-float {
width: span(4);
margin-left: span(2);
}
</code>
</section>
<section>
<header>
<h2>Gutter Function</h2>
</header>
<code class="prettyprint">
// Use to get gutter width
.tile-padded {
width: span(4);
padding-left: gutter();
padding-right: gutter();
}
</code>
</section>
<section>
<header>
<h2>Prefix Mixins</h2>
</header>
<code class="prettyprint">
// Generates browser prefixes for properties
// Transistion
@include transition(all 1s linear);
// Transform
@include transform(translateZ(0));
// Box Sizing
@include box-sizing(border-box);
// Anything you want
@include prefixer(text-shadow, 5px, webkit moz);
</code>
</section>
<section>
<header>
<h2>rem-calc()</h2>
</header>
<code class="prettyprint">
// Calculates rem value for px value
font-size: rem-calc(14);
</code>
</section>
<section>
<header>
<h2>Helper Mixins</h2>
</header>
<code class="prettyprint">
// Clearfix Mixin
//
// &:after {
// content:"";
// display:table;
// clear:both;
// }
//
@include clear;
// clear(boolean) : Use false inside media queries to use mixin instead of placeholder
@include clear(false);
// Ellipsis Mixin - ellipsis($width)
//
// display: inline-block;
// max-width: $width;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
//
@include ellipsis(200px);
// Hide Text
//
// overflow:hidden;
// text-indent: 100%;
// white-space: nowrap;
//
@include hide-text;
// hide-text(boolean) : Use false inside media queries to use mixin instead of placeholder
@include hide-text(false);
// Inline List (use on <ul>)
//
// list-style-type:none;
// padding:0;
// margin:0;
// overflow:hidden;
// > li{
// display:block;
// float:left;
// }
@include inline-list;
// Pass false to render list items as inline-block instead of float
@include inline-list(false);
</code>
</section>
<section class="typography">
<header>
<h2>Typographic Rhythm</h2>
</header>
<code class="prettyprint">
// Uses the following variable settings
//
// $rem-base - base rem size in px
// $line-height-base - line height base
// $type-rhythm-ratio - header scaling ratio
@include type(16px, 26px, 1.14);
@include type(16px, 1.5, 1.14);
// No arguments required, falls back to settings variables
@include type;
</code>
<h1>H1</h1>
<h2>H2</h2>
<h3>H3</h3>
<h4>H4</h4>
<h5>H5</h5>
<h6>H6</h6>
<p>Paragraph</p>
</section>
<section>
<header>
<h2>Installation</h2>
</header>
<code class="prettyprint">
bower install guff
// In your SCSS file
@import "guff"
</code>
<a href='https://github.com/kenwheeler/guff/' class='download-button'>
Download
<span>Latest version from GitHub</span>
</a>
</section>
<section>
<header>
<h2>Settings</h2>
</header>
<p>Override these variables at the top of your scss file.</p>
<code class="prettyprint">
// Set base font size
$rem-base: 16px !default;
// Set line height ratio base. Accepts px, em, rem or int values
$line-height-base: 26px !default;
// Vertical rhythm ratio
$type-rhythm-ratio: 1.14 !default;
// Desktop Media Query
$desktop: "(min-width: 1024px)" !default;
// Tablet Media Query
$tablet: "(min-width: 768px) and (max-width: 1023px)" !default;
// Mobile Media Query
$mobile: "(max-width: 767px)" !default;
// Set Grid Column Count
$grid-columns: 12 !default;
// Set Grid Gutter (percentage)
$grid-gutter: 4 !default;
// Set Grid Padding (as px)
$grid-padding: 20px !default;
// Set Grid Max Width (as px)
$grid-max-width: 1024px !default;
</code>
</section>
<section>
<header>
<h2>Playground</h2>
</header>
<a href='http://codepen.io/kenwheeler/pen/tpBdF' class='download-button'>
Try it out live
<span>On The Codepen Sandbox</span>
</a>
</section>
</main>
<footer class="primary">
<p>© 2014 Ken Wheeler</p>
</footer>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?lang=css"></script>
</body>
</html>