skeletor_backbone 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/app/assets/images/skeletor/skeletor.png +0 -0
  4. data/app/assets/stylesheets/skeletor-preview.sass +17 -0
  5. data/app/assets/stylesheets/skeletor.sass +64 -13
  6. data/app/assets/stylesheets/skeletor/_css3.sass +16 -16
  7. data/app/assets/stylesheets/skeletor/_functions.sass +8 -8
  8. data/app/assets/stylesheets/skeletor/_mixins.sass +20 -18
  9. data/app/assets/stylesheets/skeletor/_modules.sass +6 -8
  10. data/app/assets/stylesheets/skeletor/_settings.sass +15 -8
  11. data/app/assets/stylesheets/skeletor/{base/debug.sass → core/_debug.sass} +10 -18
  12. data/app/assets/stylesheets/skeletor/{layout → core}/_grid.sass +0 -0
  13. data/app/assets/stylesheets/skeletor/core/_helpers.sass +142 -0
  14. data/app/assets/stylesheets/skeletor/{base/print.sass → core/_print.sass} +3 -1
  15. data/app/assets/stylesheets/skeletor/{base/reset.sass → core/_reset.sass} +6 -3
  16. data/app/assets/stylesheets/skeletor/{base/foundation.sass → core/base.sass} +81 -148
  17. data/app/assets/stylesheets/skeletor/core/content.sass +93 -0
  18. data/app/assets/stylesheets/skeletor/{layout/skeleton.sass → core/layout.sass} +45 -6
  19. data/app/assets/stylesheets/skeletor/globals/css3/_prefixer.sass +14 -14
  20. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_em.sass +8 -19
  21. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_modular_scale.sass +6 -16
  22. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_percent.sass +9 -20
  23. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_rem.sass +9 -20
  24. data/app/assets/stylesheets/skeletor/globals/functions/_strip_units.sass +6 -16
  25. data/app/assets/stylesheets/skeletor/globals/mixins/_font_size.sass +31 -0
  26. data/app/assets/stylesheets/skeletor/globals/mixins/_media_query.sass +2 -6
  27. data/app/assets/stylesheets/skeletor/globals/mixins/_rem.sass +6 -61
  28. data/app/assets/stylesheets/skeletor/globals/mixins/_vertical_spacing.sass +29 -0
  29. data/app/assets/stylesheets/skeletor/modules/_forms.sass +27 -0
  30. data/app/assets/stylesheets/skeletor/modules/_rules.sass +54 -0
  31. data/app/assets/stylesheets/skeletor/modules/_tables.sass +43 -0
  32. data/app/controllers/skeletor_backbone/skeletor_controller.rb +10 -0
  33. data/app/views/skeletor_backbone/skeletor/index.html.erb +445 -0
  34. data/config/routes.rb +5 -0
  35. data/lib/generators/skeletor/install_generator.rb +2 -1
  36. data/lib/skeletor_backbone.rb +2 -2
  37. data/lib/skeletor_backbone/version.rb +1 -1
  38. data/skeletor_backbone.gemspec +2 -2
  39. data/vendor/assets/stylesheets/normalize.css +177 -160
  40. data/vendor/assets/stylesheets/pesticide.sass +206 -0
  41. metadata +36 -25
  42. data/app/assets/stylesheets/skeletor/_all.sass +0 -5
  43. data/app/assets/stylesheets/skeletor/base/helpers.sass +0 -203
@@ -1,4 +1,6 @@
1
- // Print Styles, Inlined to avoid required HTTP connection: h5bp.com/r
1
+ // Skeletor Print
2
+ // -> Print Styles Inlined to avoid required HTTP connection: h5bp.com/r
3
+ // -----------------------------------------------------------------------------
2
4
 
3
5
  @media print
4
6
  *
@@ -1,6 +1,7 @@
1
- // CSS Reset
2
- // A more conservative reset; more of a 'restart'
3
- // csswizardry.com/2011/10/reset-restarted
1
+ // Skeletor Reset
2
+ // -> A more conservative reset; more of a 'restart'
3
+ //
4
+ // csswizardry.com/2011/10/reset-restarted
4
5
  //
5
6
  // =============================================================================
6
7
  // Table of Contents
@@ -23,6 +24,7 @@
23
24
 
24
25
 
25
26
 
27
+
26
28
  // -----------------------------------------------------------------------------
27
29
  // :: VIEWPORT RESIZING
28
30
  // -----------------------------------------------------------------------------
@@ -53,6 +55,7 @@
53
55
  // -----------------------------------------------------------------------------
54
56
  // :: BOX MODEL
55
57
  // -----------------------------------------------------------------------------
58
+ // Box model adjustments - http://www.paulirish.com/2012/box-sizing-border-box-ftw/
56
59
  @if $global-border-box
57
60
  *, *:before, *:after
58
61
  +skeletor-box-sizing(border-box)
@@ -1,17 +1,16 @@
1
- // Skeletor Base Styles
2
- // These are good starting 'default' styles for a base stylesheet.
1
+ // Skeletor Base
2
+ // -> Base-level tags (body, p, ect)
3
3
  //
4
4
  // =============================================================================
5
5
  // Table of Contents
6
6
  // =============================================================================
7
7
  //
8
8
  // IMPORTS.....................Import Sass Settings and Functions
9
- // CLEARFIX....................Clearfix: contain floats
10
- // VERTICAL RHYTHM.............Consistent vertical rhythm, via margin-bottom
9
+ // VERTICAL RHYTHM.............Consistent vertical rhythm on base elements
11
10
  // MAIN........................Main Elements
12
- // HEADINGS....................Heading Elements and corresponding classes
11
+ // HEADINGS....................Heading Elements
13
12
  // PARAGRAPHS..................Paragraph Elements
14
- // HORIZONTAL RULES............Horizontal Rules and corresponding classes
13
+ // HORIZONTAL RULES............Horizontal Rules
15
14
  // LINKS.......................Anchor/Link Elements
16
15
  // IMAGES & OBJECTS............Image, Objects, and Embeds
17
16
  // BLOCKQUOTE..................Blockquote style
@@ -25,8 +24,9 @@
25
24
  // -----------------------------------------------------------------------------
26
25
  // :: IMPORTS
27
26
  // -----------------------------------------------------------------------------
28
- @import "skeletor/globals/mixins/position"
29
27
  @import "skeletor/globals/mixins/rem"
28
+ @import "skeletor/globals/mixins/font_size"
29
+ @import "skeletor/globals/mixins/vertical_spacing"
30
30
  @import "skeletor/globals/mixins/rgba"
31
31
  @import "skeletor/globals/mixins/media_query"
32
32
  @import "skeletor/globals/css3/prefixer"
@@ -40,37 +40,9 @@
40
40
 
41
41
 
42
42
 
43
- // -----------------------------------------------------------------------------
44
- // :: CLEARFIX
45
- // -----------------------------------------------------------------------------
46
-
47
- // Micro clearfix, as per: css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
48
- // Extend the clearfix class with Sass to avoid the `.cf` class appearing over and over in your markup.
49
- %clearfix
50
- &:after
51
- content: ""
52
- clear: both
53
- display: table
54
-
55
- .cf
56
- @extend %clearfix
57
-
58
-
59
-
60
-
61
-
62
43
  // -----------------------------------------------------------------------------
63
44
  // :: VERTICAL RHYTHM
64
45
  // -----------------------------------------------------------------------------
65
-
66
- // Where `margin-bottom` is concerned, this value will be the same as the
67
- // base line-height. This allows us to keep a consistent vertical rhythm.
68
- // As per: csswizardry.com/2012/06/single-direction-margin-declarations
69
-
70
- %sass-margin-bottom
71
- +skeletor-vertical-spacing($base-line-height)
72
-
73
- // Set 'vertical rhythm' on Base elements
74
46
  h1,h2,h3,h4,h5,h6,hgroup,
75
47
  ul,ol,dl,blockquote,p,address,
76
48
  table, fieldset,figure,pre, hr
@@ -81,14 +53,17 @@ table, fieldset,figure,pre, hr
81
53
  // :: MAIN
82
54
  // -----------------------------------------------------------------------------
83
55
  html
84
- font: #{skeletor-calculate-em($base-font-size)}/#{$line-height-ratio} $base-font-family
56
+ // font: #{skeletor-calculate-rem($base-font-size)}/#{$line-height-ratio} $base-font-family
57
+ +skeletor-font-size($base-font-size)
58
+ font-family: $base-font-family
59
+ line-height: $line-height-ratio
85
60
  overflow-y: scroll
86
61
  text-size-adjust: 100%
87
- // TODO: Does font-size need to adjust by media-query?
88
62
 
89
63
  html, body
90
64
  height: 100%
91
65
  min-height: 100%
66
+ position: relative
92
67
 
93
68
  html, button, input,
94
69
  select, textarea
@@ -99,6 +74,10 @@ select, textarea
99
74
  background: #b3d4fc
100
75
  text-shadow: none
101
76
 
77
+ ::-webkit-selection
78
+ background: #b3d4fc
79
+ text-shadow: none
80
+
102
81
  ::selection
103
82
  background: #b3d4fc
104
83
  text-shadow: none
@@ -122,46 +101,28 @@ img::-moz-selection
122
101
  // :: HEADINGS
123
102
  // -----------------------------------------------------------------------------
124
103
 
125
- // As per: csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css
126
- // When we define a heading we also define a corresponding class to go with it.
127
- // This allows us to apply, say, `class=kilo` to a `h3`.
128
-
129
104
  // Use `text-rendering` with caution - http://cbrac.co/SJt8p1
130
105
  h1, h2, h3, h4, h5, h6
131
106
  color: $header-font-color
132
107
  font-family: $header-font-family
133
108
  font-weight: 700
109
+ //line-height: 1.333
134
110
  text-rendering: optimizeLegibility
135
111
 
136
- h1, .kilo
112
+ // Font Sizes extended in content.sass
113
+ h1
137
114
  +skeletor-font-size($h1-size)
138
- h2, .hecto
115
+ h2
139
116
  +skeletor-font-size($h2-size)
140
- h3, .deca
117
+ h3
141
118
  +skeletor-font-size($h3-size)
142
- h4, .deci
119
+ h4
143
120
  +skeletor-font-size($h4-size)
144
- h5, .centi
121
+ h5
145
122
  +skeletor-font-size($h5-size)
146
- h6, .milli
123
+ h6
147
124
  +skeletor-font-size($h6-size)
148
125
 
149
- // Larger font-sizes
150
- .tera
151
- +skeletor-font-size($tera-size)
152
- .giga
153
- +skeletor-font-size($giga-size)
154
- .mega
155
- +skeletor-font-size($mega-size)
156
-
157
- //Smaller font-sizes
158
- .micro
159
- +skeletor-font-size($micro-size)
160
- .nano
161
- +skeletor-font-size($nano-size)
162
- .pico
163
- +skeletor-font-size($pico-size)
164
-
165
126
 
166
127
 
167
128
 
@@ -180,8 +141,7 @@ p
180
141
  // -----------------------------------------------------------------------------
181
142
  // :: HORIZONTAL RULES
182
143
  // -----------------------------------------------------------------------------
183
- // A better looking horizontal rule
184
- hr, .rule
144
+ hr
185
145
  +skeletor-vertical-spacing($base-line-height - 2px)
186
146
  border: none
187
147
  border-bottom-width: 1px
@@ -189,27 +149,6 @@ hr, .rule
189
149
  color: $gray
190
150
  //display: block
191
151
 
192
- // Extends `hr` element/class
193
- .rule--dotted
194
- border-bottom-style: dotted
195
- .rule--dashed
196
- border-bottom-style: dashed
197
-
198
- // Extend `hr` element/class and adds section sign
199
- .rule--ornament
200
- position: relative
201
-
202
- &:after
203
- +skeletor-position(absolute, 0px 0px 0 0px)
204
- content: "\00A7"
205
- line-height: 0
206
- text-align: center
207
-
208
- // Pass in arbitrary ornament through a data attribute.
209
- // hr.rule--ornament{data-ornament="!"}
210
- &[data-ornament]
211
- content: attr(data-ornament)
212
-
213
152
 
214
153
 
215
154
 
@@ -290,12 +229,11 @@ svg
290
229
  // :: BLOCKQUOTE
291
230
  // -----------------------------------------------------------------------------
292
231
  blockquote
232
+ border-left: 1px solid #ddd
293
233
  padding-left: 1rem
294
- border-left: 5px solid #e5e5e5
295
- font-style: italic
296
- font-family: $garamond
297
234
 
298
235
  p
236
+ color: $darker-gray
299
237
  margin: 0
300
238
  + p
301
239
  margin-top: 1rem
@@ -308,7 +246,7 @@ blockquote
308
246
 
309
247
  // Add an m-dash character before the footer or cit tags
310
248
  &:before
311
- content: "\2014 \2009"
249
+ content: "\2014 \0020"
312
250
 
313
251
 
314
252
 
@@ -323,13 +261,13 @@ code, kbd, pre, samp
323
261
  font-family: $monospace
324
262
 
325
263
  code, kbd
326
- font-size: 75%
264
+ font-size: 0.875rem
327
265
 
328
266
  code
329
267
  +skeletor-border-radius(3px)
330
268
  background: $lightest-gray
331
269
  border: 1px solid $light-gray
332
- padding: 0 0.3rem
270
+ padding: 0.064rem 0.317rem
333
271
  white-space: nowrap
334
272
 
335
273
  // Increase `padding` at larger viewport widths
@@ -344,7 +282,7 @@ kbd
344
282
  background: $lightest-gray
345
283
  border: 1px solid $light-gray
346
284
  margin-bottom: 1px
347
- padding: 0 0.3rem
285
+ padding: 0.064rem 0.317rem
348
286
  position: relative
349
287
  top: -1px
350
288
  white-space: nowrap
@@ -389,7 +327,7 @@ pre code
389
327
  // :: LISTS
390
328
  // -----------------------------------------------------------------------------
391
329
  // Where `margin-left` is concerned try and indent elements by a consistent amount.
392
- ul, ol, dd
330
+ ul, ol
393
331
  +skeletor-rem(margin-left, (2 * $base-line-height))
394
332
 
395
333
  // Remove Vertical spacing from nested lists.
@@ -401,6 +339,9 @@ dl dt
401
339
  color: $black
402
340
  font-weight: 700
403
341
 
342
+ dd
343
+ +skeletor-rem(margin-left, $base-line-height)
344
+
404
345
  // Nested list-style types for ordered lists
405
346
  ol
406
347
  list-style: decimal
@@ -414,6 +355,10 @@ ol
414
355
  nav ul, nav ol
415
356
  list-style: none
416
357
 
358
+ // Overwrite default vertical rhythm for nested list elements.
359
+ ol ol, ul ul, ul ol, ol ul
360
+ margin-bottom: 0
361
+
417
362
 
418
363
 
419
364
 
@@ -426,10 +371,11 @@ table
426
371
  width: 100%
427
372
 
428
373
  table th, table td
429
- overflow: visible
430
374
  +skeletor-rem(padding, ($base-line-height / 3))
375
+ overflow: visible
431
376
  text-align: left
432
377
  vertical-align: top
378
+
433
379
  @if $responsive
434
380
  +skeletor-media-query(palm)
435
381
  +skeletor-rem(padding, ($base-line-height / 2))
@@ -459,42 +405,6 @@ caption
459
405
  [rowspan="1"]
460
406
  vertical-align: top
461
407
 
462
- // Basic table styling
463
-
464
- // Outer border only
465
- .table-stripes tbody > tr:nth-child(odd) > td
466
- background-color: $lightest-gray
467
-
468
- .table-border
469
- border: 1px solid $light-gray
470
-
471
- // Border for rows
472
- .table-border__rows
473
- th, td
474
- border-top: 1px solid $light-gray
475
-
476
- // Border for rows and columns
477
- .table-border__cells
478
- th, td
479
- border-left: 1px solid $light-gray
480
- border-top: 1px solid $light-gray
481
-
482
- // Remove top border to avoid 'double' border on tables
483
- .table-border .table-border_cells, .table-border .table-border__rows
484
- thead:first-child tr:first-child th, thead:first-child tr:first-child td
485
- border-top: 0
486
-
487
- // Cleanup outside borders
488
- .table-border__cells
489
- tr th:first-child, tr td:first-child
490
- border-left: 0
491
-
492
- tr:first-child th, thead:first-child tr:first-child th
493
- border-top: 0
494
-
495
- .table-border__rows tr:last-child td
496
- border-bottom: 1px solid $light-gray
497
-
498
408
 
499
409
 
500
410
 
@@ -503,35 +413,58 @@ caption
503
413
  // :: FORMS
504
414
  // -----------------------------------------------------------------------------
505
415
  fieldset
416
+ +skeletor-font-size($base-font-size+2)
506
417
  +skeletor-rem(padding, $base-line-height)
507
- //border: 0
508
- //margin: 0
418
+ border: 0
419
+ min-width: 0
420
+
421
+ legend
422
+ border: 0
423
+ font-weight: 700
424
+ padding: 0
509
425
 
510
426
  label
511
- display: block
427
+ display: inline
512
428
 
513
- textarea
514
- height: auto
515
- resize: vertical
429
+ input[type="checkbox"], input[type="image"], input[type="radio"]
430
+ display: inline-block
431
+ width: auto
516
432
 
517
- select
518
- //width: 100%
433
+ input[type="file"]
434
+ cursor: pointer
435
+ max-width: 100%
519
436
 
520
- #{$all-text-inputs}, textarea
521
- +skeletor-rem(padding, $base-line-height)
522
- +skeletor-vertical-spacing($base-line-height / 2)
523
- +skeletor-transition(all 0.15s linear)
437
+ #{$all-text-inputs}, textarea, select
438
+ +skeletor-border-radius(4px)
524
439
  +skeletor-rgba(color, 0, 0, 0, 0.75)
440
+ +skeletor-rem(padding, $base-line-height / 3)
441
+ +skeletor-transition(all 0.15s linear)
442
+ +skeletor-vertical-spacing($base-line-height / 2)
525
443
  background-color: #fff
526
444
  border: 1px solid darken(#fff, 20%)
527
- border-radius: 4px
528
- box-shadow: inset 0 1px 2px rgba(0,0,0,0.1)
445
+ display: block
446
+ outline: 0 none
447
+ vertical-align: middle
529
448
  width: 100%
530
449
 
531
450
  &:focus
532
- background-color: darken(#fff, 2%)
533
- border-color: darken(#fff, 40%)
534
- outline: none
451
+ // box-shadow: inset 0 1px 2px rgba(0,0,0,0.1)
452
+ background-color: darken(#fff, 1%)
453
+ border-color: darken(#fff, 30%)
454
+ outline: 0 none
535
455
 
536
456
  &[disabled]
537
457
  background-color: darken(#fff, 10%)
458
+
459
+ select
460
+ +skeletor-rem(height, $base-line-height+20)
461
+ background: #f8f8f8
462
+
463
+ // Fix height issue in Firefox
464
+ @-moz-document url-prefix()
465
+ select
466
+ height: auto
467
+
468
+ textarea
469
+ height: auto
470
+ resize: vertical
@@ -0,0 +1,93 @@
1
+ // Skeletor Content
2
+ // -> Base-level typography (fonts, colors, ect)
3
+ //
4
+ // =============================================================================
5
+ // Table of Contents
6
+ // =============================================================================
7
+ //
8
+ // IMPORTS.....................Import Sass Settings and Functions
9
+ // FONT SIZING.................Font Class & heading extensions
10
+ // UTILITIES....................Helper Classes for quick layouts.
11
+ //
12
+
13
+
14
+ // -----------------------------------------------------------------------------
15
+ // :: IMPORTS
16
+ // -----------------------------------------------------------------------------
17
+ @import "skeletor/globals/mixins/font_size"
18
+ @import "skeletor/globals/mixins/opacity"
19
+
20
+
21
+
22
+
23
+
24
+ // -----------------------------------------------------------------------------
25
+ // :: FONT SIZING
26
+ // -----------------------------------------------------------------------------
27
+
28
+ // Extend h1 with classes to allow more flexibility with headings and font sizes.
29
+ .c-h1, %c-h1
30
+ @extend h1
31
+
32
+ .c-h2, %c-h2
33
+ @extend h2
34
+
35
+ .c-h3, %c-h3
36
+ @extend h3
37
+
38
+ .c-h4, %c-h4
39
+ @extend h4
40
+
41
+ .c-h5, %c-h5
42
+ @extend h5
43
+
44
+ .c-h6, %c-h6
45
+ @extend h6
46
+
47
+ // Larger font-sizes
48
+ .c-giga, %c-giga
49
+ +skeletor-font-size($giga-size)
50
+ .c-mega, %c-mega
51
+ +skeletor-font-size($mega-size)
52
+ .c-kilo, %c-kilo
53
+ +skeletor-font-size($kilo-size)
54
+
55
+ //Smaller font-sizes
56
+ .c-micro, %c-micro
57
+ +skeletor-font-size($micro-size)
58
+ .c-nano, %c-nano
59
+ +skeletor-font-size($nano-size)
60
+ .c-pico, %c-pico
61
+ +skeletor-font-size($pico-size)
62
+
63
+
64
+
65
+
66
+
67
+ // -----------------------------------------------------------------------------
68
+ // :: UTILITIES
69
+ // -----------------------------------------------------------------------------
70
+
71
+ %c-right, .c-right
72
+ text-align: right
73
+
74
+ %c-left, .c-left
75
+ text-align: left
76
+
77
+ %c-center, .c-center
78
+ text-align: center
79
+
80
+ %c-condense, .c-condense
81
+ font-size: 85%
82
+
83
+ %c-lead, .c-lead
84
+ font-size: 125%
85
+
86
+ %c-shout, .c-shout
87
+ text-transform: uppercase
88
+
89
+ %c-info, .c-info
90
+ cursor: help
91
+
92
+ %c-muted, .c-muted
93
+ +skeletor-opacity(0.5)