skeletor_backbone 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +43 -0
  6. data/Rakefile +1 -0
  7. data/app/assets/stylesheets/skeletor.sass +21 -0
  8. data/app/assets/stylesheets/skeletor/_all.sass +5 -0
  9. data/app/assets/stylesheets/skeletor/_css3.sass +26 -0
  10. data/app/assets/stylesheets/skeletor/_functions.sass +13 -0
  11. data/app/assets/stylesheets/skeletor/_mixins.sass +23 -0
  12. data/app/assets/stylesheets/skeletor/_settings.sass +153 -0
  13. data/app/assets/stylesheets/skeletor/base/debug.sass +132 -0
  14. data/app/assets/stylesheets/skeletor/base/foundation.sass +537 -0
  15. data/app/assets/stylesheets/skeletor/base/helpers.sass +203 -0
  16. data/app/assets/stylesheets/skeletor/base/print.sass +46 -0
  17. data/app/assets/stylesheets/skeletor/base/reset.sass +125 -0
  18. data/app/assets/stylesheets/skeletor/globals/css3/_animation.sass +34 -0
  19. data/app/assets/stylesheets/skeletor/globals/css3/_appearance.sass +39 -0
  20. data/app/assets/stylesheets/skeletor/globals/css3/_backface_visibility.sass +36 -0
  21. data/app/assets/stylesheets/skeletor/globals/css3/_border_radius.sass +75 -0
  22. data/app/assets/stylesheets/skeletor/globals/css3/_box_shadow.sass +38 -0
  23. data/app/assets/stylesheets/skeletor/globals/css3/_box_sizing.sass +40 -0
  24. data/app/assets/stylesheets/skeletor/globals/css3/_flexbox.sass +179 -0
  25. data/app/assets/stylesheets/skeletor/globals/css3/_gradients.sass +54 -0
  26. data/app/assets/stylesheets/skeletor/globals/css3/_hyphens.sass +38 -0
  27. data/app/assets/stylesheets/skeletor/globals/css3/_perspective.sass +50 -0
  28. data/app/assets/stylesheets/skeletor/globals/css3/_prefixer.sass +76 -0
  29. data/app/assets/stylesheets/skeletor/globals/css3/_tab_size.sass +39 -0
  30. data/app/assets/stylesheets/skeletor/globals/css3/_text_shadow.sass +38 -0
  31. data/app/assets/stylesheets/skeletor/globals/css3/_transform.sass +112 -0
  32. data/app/assets/stylesheets/skeletor/globals/css3/_transition.sass +35 -0
  33. data/app/assets/stylesheets/skeletor/globals/css3/_user_select.sass +39 -0
  34. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_em.sass +43 -0
  35. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_modular_scale.sass +85 -0
  36. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_percent.sass +42 -0
  37. data/app/assets/stylesheets/skeletor/globals/functions/_calculate_rem.sass +42 -0
  38. data/app/assets/stylesheets/skeletor/globals/functions/_strip_units.sass +38 -0
  39. data/app/assets/stylesheets/skeletor/globals/mixins/_accessibility.sass +49 -0
  40. data/app/assets/stylesheets/skeletor/globals/mixins/_grid_pull.sass +311 -0
  41. data/app/assets/stylesheets/skeletor/globals/mixins/_grid_push.sass +313 -0
  42. data/app/assets/stylesheets/skeletor/globals/mixins/_grid_widths.sass +275 -0
  43. data/app/assets/stylesheets/skeletor/globals/mixins/_hidpi.sass +38 -0
  44. data/app/assets/stylesheets/skeletor/globals/mixins/_media_query.sass +71 -0
  45. data/app/assets/stylesheets/skeletor/globals/mixins/_opacity.sass +36 -0
  46. data/app/assets/stylesheets/skeletor/globals/mixins/_position.sass +65 -0
  47. data/app/assets/stylesheets/skeletor/globals/mixins/_rem.sass +102 -0
  48. data/app/assets/stylesheets/skeletor/globals/mixins/_retina_image.sass +53 -0
  49. data/app/assets/stylesheets/skeletor/globals/mixins/_rgba.sass +37 -0
  50. data/app/assets/stylesheets/skeletor/globals/mixins/_silent_relative.sass +41 -0
  51. data/app/assets/stylesheets/skeletor/globals/mixins/_size.sass +71 -0
  52. data/app/assets/stylesheets/skeletor/globals/mixins/_triangle.sass +69 -0
  53. data/app/assets/stylesheets/skeletor/globals/mixins/_truncate_text.sass +41 -0
  54. data/app/assets/stylesheets/skeletor/globals/settings/_easing.sass +47 -0
  55. data/app/assets/stylesheets/skeletor/globals/settings/_font_stacks.sass +65 -0
  56. data/app/assets/stylesheets/skeletor/globals/settings/_html5_input_types.sass +51 -0
  57. data/app/assets/stylesheets/skeletor/layout/_grid.sass +147 -0
  58. data/app/assets/stylesheets/skeletor/layout/skeleton.sass +58 -0
  59. data/lib/generators/skeletor/install_generator.rb +26 -0
  60. data/lib/sass/sass_extend.rb +107 -0
  61. data/lib/skeletor_backbone.rb +23 -0
  62. data/lib/skeletor_backbone/version.rb +3 -0
  63. data/skeletor_backbone.gemspec +26 -0
  64. data/vendor/assets/stylesheets/normalize.css +406 -0
  65. metadata +163 -0
@@ -0,0 +1,38 @@
1
+ // =============================================================================
2
+ // HIDPI
3
+ //
4
+ // HiDPI mixin. Default value set to 1.3 to target Google Nexus 7
5
+ // http://bjango.com/articles/min-device-pixel-ratio/
6
+ //
7
+ // Available As:
8
+ // +skeletor-hidpi()
9
+ // +s-hidpi()
10
+ //
11
+ // =============================================================================
12
+
13
+
14
+
15
+ =skeletor-hidpi($ratio: 1.3)
16
+ @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
17
+ only screen and (min--moz-device-pixel-ratio: $ratio),
18
+ only screen and (-o-min-device-pixel-ratio: #{$ratio}/1),
19
+ only screen and (min-resolution: #{round($ratio*96)}dpi),
20
+ only screen and (min-resolution: #{$ratio}dppx)
21
+ @content
22
+
23
+
24
+
25
+ // -----------------------------------------------------------------------------
26
+ // Alias for hidpi mixin
27
+ // -----------------------------------------------------------------------------
28
+ =s-hidpi($ratio: 1.3)
29
+ +skeletor-hidpi($ratio)
30
+
31
+
32
+
33
+ // -----------------------------------------------------------------------------
34
+ // If no-conflict set to allow shorter mixin names
35
+ // -----------------------------------------------------------------------------
36
+ // @if $no-conflict
37
+ // =hidpi($ratio: 1.3)
38
+ // +skeletor-hidpi($ratio)
@@ -0,0 +1,71 @@
1
+ // =============================================================================
2
+ // Media Query
3
+ //
4
+ // The media query mixin is used to easily add responsive design elements
5
+ // whenever needed in the css.
6
+ //
7
+ // Available as:
8
+ // +skeletor-media-query()
9
+ // +s-media-query()
10
+ // +s-mq()
11
+ //
12
+ // Example:
13
+ // +skeletor-media-query(palm)
14
+ // p
15
+ // font-size: 14px
16
+ //
17
+ // =============================================================================
18
+
19
+
20
+
21
+ $palm-end: $lap-start - 1px
22
+ $lap-end: $desk-start - 1px
23
+
24
+ // -----------------------------------------------------------------------------
25
+ // Media Query
26
+ // -----------------------------------------------------------------------------
27
+ =skeletor-media-query($media)
28
+ @if $media == palm
29
+ @media only screen and (max-width: $palm-end)
30
+ @content
31
+
32
+ @if $media == lap
33
+ @media only screen and (min-width: $lap-start) and (max-width: $lap-end)
34
+ @content
35
+
36
+ @if $media == lap-and-up
37
+ @media only screen and (min-width: $lap-start)
38
+ @content
39
+
40
+ @if $media == portable
41
+ @media only screen and (max-width: $lap-end)
42
+ @content
43
+
44
+ @if $media == desk
45
+ @media only screen and (min-width: $desk-start)
46
+ @content
47
+
48
+ @if $media == desk-wide
49
+ @media only screen and (min-width: $desk-wide-start)
50
+ @content
51
+
52
+
53
+
54
+ // -----------------------------------------------------------------------------
55
+ // Alias for media query mixin
56
+ // -----------------------------------------------------------------------------
57
+ =s-media-query($media)
58
+ +skeletor-media-query($media)
59
+ @content
60
+
61
+ =s-mq($media)
62
+ +skeletor-media-query($media)
63
+ @content
64
+
65
+ // -----------------------------------------------------------------------------
66
+ // If no-conflict set to allow shorter mixin names
67
+ // -----------------------------------------------------------------------------
68
+ // @if $no-conflict
69
+ // =media-query($media)
70
+ // +skeletor-media-query($media)
71
+ // @content
@@ -0,0 +1,36 @@
1
+ // =============================================================================
2
+ // OPACITY
3
+ //
4
+ // The opacity mixin is used to set the opacity level for all browsers
5
+ // including IE.
6
+ //
7
+ // Available As:
8
+ // +skeletor-opacity()
9
+ // +s-opacity()
10
+ //
11
+ // =============================================================================
12
+
13
+
14
+ // -----------------------------------------------------------------------------
15
+ // Media Query
16
+ // -----------------------------------------------------------------------------
17
+ =skeletor-opacity($opacity, $important: null)
18
+ opacity: $opacity $important
19
+ filter: alpha(opacity= $opacity * 100 ) $important
20
+
21
+
22
+
23
+ // -----------------------------------------------------------------------------
24
+ // Alias for opacity mixin
25
+ // -----------------------------------------------------------------------------
26
+ =s-opacity($opacity, $important: null)
27
+ +skeletor-opacity($opacity, $important)
28
+
29
+
30
+
31
+ // -----------------------------------------------------------------------------
32
+ // If no-conflict set to allow shorter mixin names
33
+ // -----------------------------------------------------------------------------
34
+ // @if $no-conflict
35
+ // =opacity($opacity, $important: null)
36
+ // +skeletor-opacity($opacity, $important)
@@ -0,0 +1,65 @@
1
+ // =============================================================================
2
+ // POSITION
3
+ //
4
+ // The position mixin is used to easily set elements position, by providing
5
+ // the position type and location.
6
+ //
7
+ // Available As:
8
+ // +skeletor-position()
9
+ // +s-position()
10
+ //
11
+ // =============================================================================
12
+
13
+
14
+
15
+ // -----------------------------------------------------------------------------
16
+ // Position
17
+ // -----------------------------------------------------------------------------
18
+ =skeletor-position($position: relative, $coordinates: 0 0 0 0)
19
+ @if type-of($position) == list
20
+ $coordinates: $position
21
+ $position: relative
22
+
23
+ $top: nth($coordinates, 1)
24
+ $right: nth($coordinates, 2)
25
+ $bottom: nth($coordinates, 3)
26
+ $left: nth($coordinates, 4)
27
+
28
+ position: $position
29
+
30
+ @if $top == auto
31
+ top: $top
32
+ @else if not(unitless($top))
33
+ top: $top
34
+
35
+ @if $right == auto
36
+ right: $right
37
+ @else if not(unitless($right))
38
+ right: $right
39
+
40
+ @if $bottom == auto
41
+ bottom: $bottom
42
+ @else if not(unitless($bottom))
43
+ bottom: $bottom
44
+
45
+ @if $left == auto
46
+ left: $left
47
+ @else if not(unitless($left))
48
+ left: $left
49
+
50
+
51
+
52
+ // -----------------------------------------------------------------------------
53
+ // Alias for position mixin
54
+ // -----------------------------------------------------------------------------
55
+ =s-position($position: relative, $coordinates: 0 0 0 0)
56
+ +skeletor-position($position, $coordinates)
57
+
58
+
59
+
60
+ // -----------------------------------------------------------------------------
61
+ // If no-conflict set to allow shorter mixin names
62
+ // -----------------------------------------------------------------------------
63
+ // @if $no-conflict
64
+ // =position($position: relative, $coordinates: 0 0 0 0)
65
+ // +skeletor-position($position, $coordinates)
@@ -0,0 +1,102 @@
1
+ // =============================================================================
2
+ // REM
3
+ //
4
+ // The REM mixin will set the REM value with a pixel fallback for browsers
5
+ // that don't yet support rem. Vertical Spacing and Fontsize are setup as
6
+ // shorthand for the REM mixin. Vertical Spacing mixin uses the REM
7
+ // calculation to apply a rem `margin-bottom`. Font Size mixin uses the REM
8
+ // calculation top apply a rem `font-size`.
9
+ //
10
+ // TODO:
11
+ // REM should be able to accept multiple properties? Should those multiple
12
+ // properties allow different values?
13
+ //
14
+ // Available As:
15
+ // +skeletor-rem()
16
+ // +s-rem()
17
+ // +skeletor-vertical-spacing()
18
+ // +s-vertical-spacing()
19
+ // +s-vs()
20
+ // +skeletor-font-size()
21
+ // +s-font-size()
22
+ // +s-fs()
23
+ //
24
+ // =============================================================================
25
+
26
+
27
+
28
+ // -----------------------------------------------------------------------------
29
+ // REM
30
+ // -----------------------------------------------------------------------------
31
+ =skeletor-rem($property, $values)
32
+ $px-values: ()
33
+ $rem-values: ()
34
+
35
+ @each $value in $values
36
+ @if type-of($value) == "number" and $value > 0
37
+ $new-rem: skeletor-calculate-rem($value)
38
+ $px-values: join($px-values, round($value))
39
+ $rem-values: join($rem-values, $new-rem)
40
+
41
+ @else if $value == 0 or $value == 0px
42
+ $px-values: join($px-values, 0)
43
+ $rem-values: join($rem-values, 0)
44
+
45
+ @else
46
+ $px-values: join($px-values, $value)
47
+ $rem-values: join($rem-values, $value)
48
+
49
+ // output the converted rules
50
+ #{$property}: $px-values
51
+ #{$property}: $rem-values
52
+
53
+
54
+
55
+ // -----------------------------------------------------------------------------
56
+ // Alias for REM mixin
57
+ // -----------------------------------------------------------------------------
58
+ =s-rem($property, $values)
59
+ +skeletor-rem($property, $values)
60
+
61
+
62
+
63
+ // -----------------------------------------------------------------------------
64
+ // Shorthand for rem vertical spacing (margin-bottom)
65
+ // -----------------------------------------------------------------------------
66
+ =skeletor-vertical-spacing($target)
67
+ +skeletor-rem(margin-bottom, $target)
68
+
69
+ =s-vertical-spacing($target)
70
+ +skeletor-vertical-spacing($target)
71
+
72
+ =s-vs($target)
73
+ +skeletor-vertical-spacing($target)
74
+
75
+
76
+ // -----------------------------------------------------------------------------
77
+ // Shorthand for rem font-size
78
+ // -----------------------------------------------------------------------------
79
+ =skeletor-font-size($target, $line-height:false)
80
+ +skeletor-rem(font-size, $target)
81
+ @if $line-height
82
+ line-height: ($base-line-height / $target)
83
+
84
+ =s-font-size($target, $line-height: false)
85
+ +skeletor-font-size($target, $line-height)
86
+
87
+ =s-fs($target, $line-height: false)
88
+ +skeletor-font-size($target, $line-height)
89
+
90
+
91
+ // -----------------------------------------------------------------------------
92
+ // If no-conflict set to allow shorter mixin names
93
+ // -----------------------------------------------------------------------------
94
+ // @if $no-conflict
95
+ // =rem($property, $values)
96
+ // +skeletor-rem($property, $values)
97
+
98
+ // =vertical-spacing($target)
99
+ // +skeletor-vertical-spacing($target)
100
+
101
+ // =font-size($target, $line-height: false)
102
+ // +skeletor-font-size($target, $line-height)
@@ -0,0 +1,53 @@
1
+ // =============================================================================
2
+ // RETINA IMAGE
3
+ //
4
+ // The retina image mixin will use a 'retina' image if available.
5
+ //
6
+ // Available As:
7
+ // +skeletor-retina-image()
8
+ // +s-retina-image()
9
+ // +s-ri()
10
+ //
11
+ // =============================================================================
12
+
13
+
14
+
15
+ @import "skeletor/globals/mixins/hidpi"
16
+
17
+ // -----------------------------------------------------------------------------
18
+ // Retina Image
19
+ // -----------------------------------------------------------------------------
20
+ =skeletor-retina-image($filename, $background-size, $extension: png, $retina-suffix: _2x, $asset-pipeline: true)
21
+ @if $asset-pipeline
22
+ background-image: image-url("#{$filename}.#{$extension}")
23
+ @else
24
+ background-image: url("#{$filename}.#{$extension}")
25
+
26
+ +skeletor-hidpi
27
+ @if $asset-pipeline
28
+ background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}")
29
+
30
+ @else {
31
+ background-image: url("#{$filename}#{$retina-suffix}.#{$extension}")
32
+
33
+ background-size: $background-size
34
+
35
+
36
+
37
+ // -----------------------------------------------------------------------------
38
+ // Alias for retina image mixin
39
+ // -----------------------------------------------------------------------------
40
+ =s-retina-image($filename, $background-size, $extension: png, $retina-suffix: _2x, $asset-pipeline: true)
41
+ +skeletor-retina-image($filename, $background-size, $extension, $retina-suffix, $asset-pipeline)
42
+
43
+ =s-ri($filename, $background-size, $extension: png, $retina-suffix: _2x, $asset-pipeline: true)
44
+ +skeletor-retina-image($filename, $background-size, $extension, $retina-suffix, $asset-pipeline)
45
+
46
+
47
+
48
+ // -----------------------------------------------------------------------------
49
+ // If no-conflict set to allow shorter mixin names
50
+ // -----------------------------------------------------------------------------
51
+ // @if $no-conflict
52
+ // =retina-image($filename, $background-size, $extension: png, $retina-suffix: _2x, $asset-pipeline: true)
53
+ // +skeletor-retina-image($filename, $background-size, $extension, $retina-suffix, $asset-pipeline)
@@ -0,0 +1,37 @@
1
+ // =============================================================================
2
+ // RGBA MIXIN
3
+ //
4
+ // The rgba mixin is used for generating rgba color with a rgb fallback for
5
+ // older browsers.
6
+ //
7
+ // Available As:
8
+ // +skeletor-rgba()
9
+ // +s-rgba()
10
+ //
11
+ // =============================================================================
12
+
13
+
14
+
15
+ // -----------------------------------------------------------------------------
16
+ // RGBA MIXIN
17
+ // -----------------------------------------------------------------------------
18
+ =skeletor-rgba($property, $red, $green, $blue, $alpha)
19
+ #{$property}: rgb($red, $green, $blue)
20
+ #{$property}: rgba($red, $green, $blue, $alpha)
21
+
22
+
23
+
24
+ // -----------------------------------------------------------------------------
25
+ // Alias for rgba mixin
26
+ // -----------------------------------------------------------------------------
27
+ =s-rgba($property, $red, $green, $blue, $alpha)
28
+ +skeletor-rgba($property, $red, $green, $blue, $alpha)
29
+
30
+
31
+
32
+ // -----------------------------------------------------------------------------
33
+ // If no-conflict set to allow shorter mixin names
34
+ // -----------------------------------------------------------------------------
35
+ // @if $no-conflict
36
+ // =rgba($property, $red, $green, $blue, $alpha)
37
+ // +skeletor-rgba($property, $red, $green, $blue, $alpha)
@@ -0,0 +1,41 @@
1
+ // =============================================================================
2
+ // Silent Relative
3
+ //
4
+ // The silent relative mixin adds relative positioning into the 'silent'
5
+ // classes which can't take advantage of the `[class*="push--"]` and
6
+ // `[class*="pull--"]` selectors. Primarily used in grid mixins.
7
+ //
8
+ // Available As:
9
+ // +skeletor-silent-relative()
10
+ // +s-silent-relative()
11
+ // +s-sr()
12
+ //
13
+ // =============================================================================
14
+
15
+
16
+
17
+ // -----------------------------------------------------------------------------
18
+ // Silent Relative
19
+ // -----------------------------------------------------------------------------
20
+ =skeletor-silent-relative
21
+ @if $use-silent-classes
22
+ position: relative
23
+
24
+
25
+
26
+ // -----------------------------------------------------------------------------
27
+ // Alias for silent relative mixin
28
+ // -----------------------------------------------------------------------------
29
+ =s-silent-relative
30
+ +skeletor-silent-relative
31
+
32
+ =s-sr
33
+ +skeletor-silent-relative
34
+
35
+
36
+ // -----------------------------------------------------------------------------
37
+ // If no-conflict set to allow shorter mixin names
38
+ // -----------------------------------------------------------------------------
39
+ // @if $no-conflict
40
+ // =silent-relative
41
+ // +skeletor-silent-relative