forked from jonikorpi/Golden-Grid-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GGS.styl
342 lines (248 loc) · 6.16 KB
/
GGS.styl
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
341
342
/*
*
* Golden Grid System (1.0) <http//goldengridsystem.com/>
* by Joni Korpi <http//jonikorpi.com/>
* licensed under MIT <http//opensource.org/licenses/mit-license.php>
*
*/
//
// Important numbers
//
line = 24
column = 100% / 18
font-size = 16
em = font-size * 1
/*
*
* Margin, padding, and border resets
* except for form elements
*
*/
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, a, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, nav, section, menu, time, mark, audio, video, canvas
margin 0
padding 0
border 0
/*
*
* Consistency fixes
* adopted from http//necolas.github.com/normalize.css/
*
*/
html
height 100%
-webkit-text-size-adjust 100%
-ms-text-size-adjust 100%
body
min-height 100%
font-size 100%
article, aside, details, figcaption, figure,
footer, header, hgroup, nav, section, audio, canvas, video
display block
sub, sup
font-size 75%
line-height 0
position relative
vertical-align baseline
sup
top -0.5em
sub
bottom -0.25em
pre
white-space pre
white-space pre-wrap
word-wrap break-word
b, strong
font-weight bold
abbr[title]
border-bottom 1px dotted
input, textarea, button, select
margin 0
font-size 100%
line-height normal
vertical-align baseline
button,
html input[type="button"],
input[type="reset"],
input[type="submit"]
cursor pointer
-webkit-appearance button
input[type="checkbox"],
input[type="radio"]
-webkit-box-sizing border-box
-moz-box-sizing border-box
-ms-box-sizing border-box
-o-box-sizing border-box
box-sizing border-box
textarea
overflow auto
table
border-collapse collapse
border-spacing 0
/*
*
* Simple fluid media
*
*/
figure
position relative
figure img, figure object, figure embed, figure video
max-width 100%
display block
img
border 0
-ms-interpolation-mode bicubic
/*
*
* Zoomable baseline grid
* type size presets
*
*/
body
/* 16px / 24px */
font-size (font-size / 16) * 1em
line-height (line / em) * 1em
.small
/* 13px / 18px */
font-size ((font-size*0.8125) / em) * 1em
line-height ((line*0.75) / (font-size*0.8125)) * 1em
.normal, h3
/* 16px / 24px */
font-size (font-size / em) * 1em
line-height (line / em) * 1em /* 24 */
.large, h2, h1
/* 26 / 36px */
font-size (26 / em) * 1em
line-height ((line*1.5) / 26) * 1em
hude(n=1)
/* 42px / 48px */
font-size (42 / em) * 1em
line-height ((line*2) / 42) * 1em
.huge
hude()
.massive
/* 68px / 72px */
font-size (68 / em) * 1em
line-height ((line*3) / 68) * 1em
.gigantic
/* 110px / 120px */
font-size (110 / em) * 1em
line-height ((line*5) / 110) * 1em
/*
*
* Four-column grid active
* ----------------------------------------
* Margin | # 1 2 3 4 | Margin
* 5.55555% | % 25 50 75 100 | 5.55555%
*
*/
header, #twoway
margin 0 column
h1, h2
margin (24/26*1em) 0 (36/26*1em)
h2
font-weight normal
h3
margin (24/em)*1em 0 (24/em) * 1em
/*
* Simple elastic gutters
* Note box-sizing will not work in IE6-7
*/
.wrapper
padding 0 ((line/2)/em) * 1em
-webkit-box-sizing border-box
-moz-box-sizing border-box
-ms-box-sizing border-box
box-sizing border-box
/*
*
* Fixes for IE6-8
* http//jonikorpi.com/leaving-old-IE-behind/
*
*/
.ie body
width (640/em) * 1em
margin 0 auto
font-size ((font-size + 1) / em) * 1em
.ie h1
hude()
margin (48/42*1em) 0 (24/42*1em)
/* @media screen and (min-width: 640px) */
@media screen and (min-width: 40em)
body
/* Zoom baseline grid to 17/16 = 1.0625 */
font-size ((font-size + 1) / em) * 1em
h1
hude()
margin (48/42*1em) 0 (24/42*1em)
/*
*
* Eight-column grid active
* ----------------------------------------------------------------------
* Margin | # 1 2 3 4 5 6 7 8 | Margin
* 5.55555% | % 12.5 25.0 37.5 50.0 62.5 75.0 87.5 100 | 5.55555%
*
*
*/
/* @media screen and (min-width: 720px) */
@media screen and (min-width: 45em)
body
/* Reset baseline grid to 16/16 = 1 */
font-size ((font-size) / em) * 1em
#twoway .wrapper
float left
width 50%
/* @media screen and (min-width: 888px) */
@media screen and (min-width: 55.5em)
body
/* Zoom baseline grid to 17/16 = 1.0625 */
font-size ((font-size + 1) / em) * 1em
/* @media screen and (min-width: 984px) */
@media screen and (min-width: 61.5em)
body
/* Reset baseline grid to 16/16 = 1.0 */
font-size ((font-size) / em) * 1em
header, #twoway
margin 0 column*3
/* @media screen and (min-width: 1200px) */
@media screen and (min-width: 75em)
body
/* Zoom baseline grid to 17/16 = 1.0625 */
font-size ((font-size + 1) / em) * 1em
/* @media screen and (min-width: 1392px) */
@media screen and (min-width: 87em)
body
/* Reset baseline grid to 16/16 = 1.0 */
font-size ((font-size) / em) * 1em
header, #twoway
margin 0 column*5
/* @media screen and (min-width: 1680px) */
@media screen and (min-width: 105em)
body
/* Zoom baseline grid to 17/16 = 1.0625 */
font-size ((font-size + 1) / em) * 1em
/*
*
* Sixteen-column grid active
* ----------------------------------------------------------------------------------------------------------------------
* Margin | # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Margin
* 5.55555% | % 6.25 12.5 18.75 25.0 31.25 37.5 43.75 50.0 56.25 62.5 68.75 75.0 81.25 87.5 93.75 100 | 5.55555%
*
*
*/
/* @media screen and (min-width: 1872px) */
@media screen and (min-width: 117em)
header, #twoway
margin 0 column*1
header .wrapper
width 37.5%
margin-left 25%
#twoway .wrapper
width 25%
#twoway .wrapperfirst-child
margin-left 25%
/* @media screen and (min-width: 2080px) */
@media screen and (min-width: 130em)
body
/* Zoom baseline grid to 18/16 = 1.125 */
font-size ((font-size + 2) / em) * 1em
max-width (2560/em) * 1em