susy 1.0.9 → 2.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. data/CHANGELOG.mkdn +0 -27
  2. data/README.md +4 -87
  3. data/docs/BUGS.md +2 -0
  4. data/docs/Gemfile.lock +142 -0
  5. data/docs/README.md +54 -0
  6. data/docs/config.rb +120 -0
  7. data/docs/lib/guide_helpers.rb +19 -0
  8. data/docs/source/apple-touch-icon-114x114-precomposed.png +0 -0
  9. data/docs/source/apple-touch-icon-144x144-precomposed.png +0 -0
  10. data/docs/source/apple-touch-icon-72x72-precomposed.png +0 -0
  11. data/docs/source/apple-touch-icon-precomposed.png +0 -0
  12. data/docs/source/demos/grid-types.html.md +263 -0
  13. data/docs/source/demos/index.html.md +23 -0
  14. data/docs/source/demos/magic.html.md +320 -0
  15. data/docs/source/favicon.ico +0 -0
  16. data/docs/source/fonts/@Font-Face License.txt +18 -0
  17. data/docs/source/fonts/Baskerville-amp-webfont.eot +0 -0
  18. data/docs/source/fonts/Baskerville-amp-webfont.svg +241 -0
  19. data/docs/source/fonts/Baskerville-amp-webfont.ttf +0 -0
  20. data/docs/source/fonts/Baskerville-amp-webfont.woff +0 -0
  21. data/docs/source/fonts/CenturyOldStyle-Bold-webfont.eot +0 -0
  22. data/docs/source/fonts/CenturyOldStyle-Bold-webfont.svg +240 -0
  23. data/docs/source/fonts/CenturyOldStyle-Bold-webfont.ttf +0 -0
  24. data/docs/source/fonts/CenturyOldStyle-Bold-webfont.woff +0 -0
  25. data/docs/source/fonts/CenturyOldStyle-Italic-webfont.eot +0 -0
  26. data/docs/source/fonts/CenturyOldStyle-Italic-webfont.svg +240 -0
  27. data/docs/source/fonts/CenturyOldStyle-Italic-webfont.ttf +0 -0
  28. data/docs/source/fonts/CenturyOldStyle-Italic-webfont.woff +0 -0
  29. data/docs/source/fonts/CenturyOldStyle-Regular-webfont.eot +0 -0
  30. data/docs/source/fonts/CenturyOldStyle-Regular-webfont.svg +240 -0
  31. data/docs/source/fonts/CenturyOldStyle-Regular-webfont.ttf +0 -0
  32. data/docs/source/fonts/CenturyOldStyle-Regular-webfont.woff +0 -0
  33. data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.eot +0 -0
  34. data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.svg +240 -0
  35. data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.ttf +0 -0
  36. data/docs/source/fonts/CenturyOldStyleCaps-Regular-webfont.woff +0 -0
  37. data/docs/source/fonts/FranklinGothic-Book-webfont.eot +0 -0
  38. data/docs/source/fonts/FranklinGothic-Book-webfont.svg +240 -0
  39. data/docs/source/fonts/FranklinGothic-Book-webfont.ttf +0 -0
  40. data/docs/source/fonts/FranklinGothic-Book-webfont.woff +0 -0
  41. data/docs/source/fonts/FranklinGothic-BookIt-webfont.eot +0 -0
  42. data/docs/source/fonts/FranklinGothic-BookIt-webfont.svg +240 -0
  43. data/docs/source/fonts/FranklinGothic-BookIt-webfont.ttf +0 -0
  44. data/docs/source/fonts/FranklinGothic-BookIt-webfont.woff +0 -0
  45. data/docs/source/fonts/FranklinGothic-Cd-webfont.eot +0 -0
  46. data/docs/source/fonts/FranklinGothic-Cd-webfont.svg +240 -0
  47. data/docs/source/fonts/FranklinGothic-Cd-webfont.ttf +0 -0
  48. data/docs/source/fonts/FranklinGothic-Cd-webfont.woff +0 -0
  49. data/docs/source/fonts/FranklinGothic-CdIt-webfont.eot +0 -0
  50. data/docs/source/fonts/FranklinGothic-CdIt-webfont.svg +240 -0
  51. data/docs/source/fonts/FranklinGothic-CdIt-webfont.ttf +0 -0
  52. data/docs/source/fonts/FranklinGothic-CdIt-webfont.woff +0 -0
  53. data/docs/source/fonts/FranklinGothic-Med-webfont.eot +0 -0
  54. data/docs/source/fonts/FranklinGothic-Med-webfont.svg +240 -0
  55. data/docs/source/fonts/FranklinGothic-Med-webfont.ttf +0 -0
  56. data/docs/source/fonts/FranklinGothic-Med-webfont.woff +0 -0
  57. data/docs/source/fonts/FranklinGothic-MedCd-webfont.eot +0 -0
  58. data/docs/source/fonts/FranklinGothic-MedCd-webfont.svg +240 -0
  59. data/docs/source/fonts/FranklinGothic-MedCd-webfont.ttf +0 -0
  60. data/docs/source/fonts/FranklinGothic-MedCd-webfont.woff +0 -0
  61. data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.eot +0 -0
  62. data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.svg +240 -0
  63. data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.ttf +0 -0
  64. data/docs/source/fonts/FranklinGothic-MedCdIt-webfont.woff +0 -0
  65. data/docs/source/fonts/FranklinGothic-MedIt-webfont.eot +0 -0
  66. data/docs/source/fonts/FranklinGothic-MedIt-webfont.svg +240 -0
  67. data/docs/source/fonts/FranklinGothic-MedIt-webfont.ttf +0 -0
  68. data/docs/source/fonts/FranklinGothic-MedIt-webfont.woff +0 -0
  69. data/docs/source/fonts/License.txt +77 -0
  70. data/docs/source/fonts/susy.eot +0 -0
  71. data/docs/source/fonts/susy.svg +69 -0
  72. data/docs/source/fonts/susy.ttf +0 -0
  73. data/docs/source/fonts/susy.woff +0 -0
  74. data/docs/source/guides/getting-started.html.md +277 -0
  75. data/docs/source/guides/reference.html.md +658 -0
  76. data/docs/source/guides/upgrade-1-0.html.md +286 -0
  77. data/docs/source/humans.txt +45 -0
  78. data/docs/source/images/splash-iphone.png +0 -0
  79. data/docs/source/images/splash-iphone4.png +0 -0
  80. data/docs/source/images/splash-landscape.png +0 -0
  81. data/docs/source/images/splash-portrait.png +0 -0
  82. data/docs/source/index.html.md +87 -0
  83. data/docs/source/javascripts/jquery-1.7.1.min.js +4 -0
  84. data/docs/source/javascripts/jqwidont.js +5 -0
  85. data/docs/source/javascripts/modernizr-2.5.3.min.js +4 -0
  86. data/docs/source/javascripts/modernizr.selectors.js +55 -0
  87. data/docs/source/javascripts/viewport.js +9 -0
  88. data/docs/source/layouts/grid-types.haml +22 -0
  89. data/docs/source/layouts/layout.haml +34 -0
  90. data/docs/source/layouts/magic.haml +28 -0
  91. data/docs/source/partials/_contentinfo.haml +47 -0
  92. data/docs/source/partials/_demonav.haml +2 -0
  93. data/docs/source/partials/_google_analytics.haml +5 -0
  94. data/docs/source/partials/_head.haml +22 -0
  95. data/docs/source/partials/_javascripts.haml +4 -0
  96. data/docs/source/partials/_navigation.haml +15 -0
  97. data/docs/source/sites-using-susy.html.md +29 -0
  98. data/docs/source/stylesheets/_base/_base.scss +23 -0
  99. data/docs/source/stylesheets/_base/_colors.scss +47 -0
  100. data/docs/source/stylesheets/_base/_size.scss +49 -0
  101. data/docs/source/stylesheets/_base/_type.scss +19 -0
  102. data/docs/source/stylesheets/_demos/_demo.scss +28 -0
  103. data/docs/source/stylesheets/_demos/magic/_layout.scss +39 -0
  104. data/docs/source/stylesheets/_demos/magic/_style.scss +104 -0
  105. data/docs/source/stylesheets/_demos/types/_layouts.scss +88 -0
  106. data/docs/source/stylesheets/_demos/types/_template.scss +57 -0
  107. data/docs/source/stylesheets/_general/_century-oldstyle.scss +70 -0
  108. data/docs/source/stylesheets/_general/_font-license.scss +23 -0
  109. data/docs/source/stylesheets/_general/_fonts.scss +26 -0
  110. data/docs/source/stylesheets/_general/_franklin-gothic.scss +112 -0
  111. data/docs/source/stylesheets/_general/_icons.scss +86 -0
  112. data/docs/source/stylesheets/_general/_root.scss +79 -0
  113. data/docs/source/stylesheets/_general/_type.scss +114 -0
  114. data/docs/source/stylesheets/_layout.scss +48 -0
  115. data/docs/source/stylesheets/_modules/_ag-test.scss +59 -0
  116. data/docs/source/stylesheets/_modules/_banner.scss +61 -0
  117. data/docs/source/stylesheets/_modules/_contentinfo.scss +41 -0
  118. data/docs/source/stylesheets/_modules/_intro.scss +53 -0
  119. data/docs/source/stylesheets/_modules/_nav.scss +44 -0
  120. data/docs/source/stylesheets/_modules/_pages.scss +5 -0
  121. data/docs/source/stylesheets/_modules/_secondary.scss +22 -0
  122. data/docs/source/stylesheets/_modules/_toggle.scss +40 -0
  123. data/docs/source/stylesheets/_vendor/pygments/solarized.scss +65 -0
  124. data/docs/source/stylesheets/grid-types.css.scss +6 -0
  125. data/docs/source/stylesheets/magic.css.scss +6 -0
  126. data/docs/source/stylesheets/site.css.scss +27 -0
  127. data/lib/susy.rb +12 -1
  128. data/sass/README.md +33 -0
  129. data/sass/_susy.scss +55 -16
  130. data/sass/susy/_api.scss +39 -0
  131. data/sass/susy/_grids.scss +2 -0
  132. data/sass/susy/_gutters.scss +2 -0
  133. data/sass/susy/_helpers.scss +14 -0
  134. data/sass/susy/_language.scss +3 -0
  135. data/sass/susy/_math.scss +3 -0
  136. data/sass/susy/api/_float.scss +72 -0
  137. data/sass/susy/api/_isolation.scss +16 -0
  138. data/sass/susy/grids/_add.scss +10 -0
  139. data/sass/susy/grids/_find.scss +10 -0
  140. data/sass/susy/gutters/_add.scss +10 -0
  141. data/sass/susy/gutters/_find.scss +10 -0
  142. data/sass/susy/helpers/_background-grid.scss +65 -0
  143. data/sass/susy/helpers/_box-sizing.scss +25 -0
  144. data/sass/susy/helpers/_clearfix.scss +51 -0
  145. data/sass/susy/helpers/_columns.scss +15 -0
  146. data/sass/susy/helpers/_find.scss +63 -0
  147. data/sass/susy/helpers/_sass-lists.scss +71 -0
  148. data/sass/susy/helpers/_span-shared.scss +9 -0
  149. data/sass/susy/language/_parse-add.scss +19 -0
  150. data/sass/susy/language/_parse-list.scss +53 -0
  151. data/sass/susy/language/_span.scss +20 -0
  152. data/sass/susy/math/_columns.scss +70 -0
  153. data/sass/susy/math/_context.scss +3 -0
  154. data/sass/susy/math/_gutters.scss +11 -0
  155. data/templates/box-sizing/behaviors/box-sizing/boxsizing.htc +399 -0
  156. data/templates/box-sizing/behaviors/box-sizing/boxsizing.php +23 -0
  157. data/templates/box-sizing/manifest.rb +4 -0
  158. data/templates/project/README.md +59 -0
  159. data/templates/project/_base.scss +0 -10
  160. data/templates/project/behaviors/box-sizing/boxsizing.htc +399 -0
  161. data/templates/project/behaviors/box-sizing/boxsizing.php +23 -0
  162. data/templates/project/manifest.rb +3 -0
  163. data/templates/project/screen.scss +0 -8
  164. metadata +200 -43
  165. data/Manifest +0 -39
  166. data/Rakefile +0 -19
  167. data/VERSION +0 -1
  168. data/sass/susy/_background.scss +0 -18
  169. data/sass/susy/_functions.scss +0 -376
  170. data/sass/susy/_grid.scss +0 -286
  171. data/sass/susy/_isolation.scss +0 -51
  172. data/sass/susy/_margin.scss +0 -93
  173. data/sass/susy/_media.scss +0 -112
  174. data/sass/susy/_padding.scss +0 -92
  175. data/sass/susy/_settings.scss +0 -56
  176. data/sass/susy/_support.scss +0 -198
  177. data/sass/susy/_units.scss +0 -159
  178. data/susy.gemspec +0 -35
  179. data/test/config.rb +0 -10
  180. data/test/css/background.css +0 -16
  181. data/test/css/bleed.css +0 -20
  182. data/test/css/functions.css +0 -7
  183. data/test/css/grid.css +0 -134
  184. data/test/css/isolation.css +0 -46
  185. data/test/css/margin.css +0 -20
  186. data/test/css/media.css +0 -101
  187. data/test/css/padding.css +0 -12
  188. data/test/scss/background.scss +0 -11
  189. data/test/scss/bleed.scss +0 -19
  190. data/test/scss/functions.scss +0 -15
  191. data/test/scss/grid.scss +0 -77
  192. data/test/scss/isolation.scss +0 -19
  193. data/test/scss/margin.scss +0 -27
  194. data/test/scss/media.scss +0 -50
  195. data/test/scss/padding.scss +0 -19
@@ -0,0 +1,39 @@
1
+ @mixin grid-span($span, $location, $context: false, $gutter: false, $output-style: $output) {
2
+
3
+ @if $output-style == 'float' {
4
+ @include output-float($span, $location, $context, $gutter);
5
+ }
6
+ @else if $output-style == 'isolation' {
7
+ @include output-isolation($span, $location, $context, $gutter);
8
+ }
9
+ }
10
+
11
+ @mixin push($span, $location, $context: false, $gutter: false, $output-style: $output) {
12
+
13
+ @if $output-style == 'float' {
14
+ @include push-float($span, $location, $context, $gutter);
15
+ }
16
+ @else if $output-style == 'isolation' {
17
+ @include push-isolation($span, $location, $context, $gutter);
18
+ }
19
+ }
20
+
21
+ @mixin pull($span, $location, $context: false, $gutter: false, $output-style: $output) {
22
+
23
+ @if $output-style == 'float' {
24
+ @include pull-float($span, $location, $context, $gutter);
25
+ }
26
+ @else if $output-style == 'isolation' {
27
+ @include pull-isolation($span, $location, $context, $gutter);
28
+ }
29
+ }
30
+
31
+ @mixin isolate($span, $location, $context: false, $gutter: false, $output-style: $output) {
32
+
33
+ @if $output-style == 'float' {
34
+ @include isolate-float($span, $location, $context, $gutter);
35
+ }
36
+ }
37
+
38
+ @import "api/float";
39
+ @import "api/isolation";
@@ -0,0 +1,2 @@
1
+ @import "grids/add";
2
+ @import "grids/find";
@@ -0,0 +1,2 @@
1
+ @import "gutters/add";
2
+ @import "gutters/find";
@@ -0,0 +1,14 @@
1
+ //////////////////////////////
2
+ // Code Helpers
3
+ //////////////////////////////
4
+ @import "helpers/find";
5
+ @import "helpers/sass-lists";
6
+ @import "helpers/columns";
7
+ @import "helpers/clearfix";
8
+ @import "helpers/box-sizing";
9
+ @import "helpers/span-shared";
10
+
11
+ //////////////////////////////
12
+ // UI Helpers
13
+ //////////////////////////////
14
+ @import "helpers/background-grid";
@@ -0,0 +1,3 @@
1
+ @import "language/parse-list";
2
+ @import "language/parse-add";
3
+ @import "language/span";
@@ -0,0 +1,3 @@
1
+ @import "math/columns";
2
+ @import "math/gutters";
3
+ @import "math/context";
@@ -0,0 +1,72 @@
1
+ @mixin output-float($span, $location, $columns, $gutter) {
2
+
3
+ $location-holder: $location;
4
+
5
+ @if type-of($location) == string {
6
+ @if end-row($span, $location, $columns) {
7
+ $grid-length: length(find-grid($columns));
8
+ $location-holder: $grid-length - $span;
9
+ }
10
+ @else {
11
+ $location-holder: 1;
12
+ }
13
+ }
14
+
15
+ $gutter: find-gutter($gutter);
16
+
17
+ width: column-span($span, $location-holder, $columns, $gutter);
18
+ clear: right;
19
+ // @include clearfix;
20
+
21
+ @if end-row($span, $location, $columns) {
22
+ float: right;
23
+ }
24
+ @else {
25
+ float: left;
26
+ margin-right: gutter-span($gutter, $columns);
27
+ }
28
+
29
+ @include span-shared;
30
+ }
31
+
32
+ @mixin push-float($span, $location, $columns: false, $gutter: false) {
33
+
34
+ @if type-of($location) == string {
35
+ $location: 1;
36
+ }
37
+
38
+ // Find the columns and gutters
39
+ $columns: find-grid($columns);
40
+ $gutter: find-gutter($gutter);
41
+
42
+ // Combine the columns and gutters
43
+ $gutter: column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns);
44
+
45
+ margin-left: $gutter;
46
+ }
47
+
48
+ @mixin pull-float($span, $location, $columns: false, $gutter: false) {
49
+
50
+ @if type-of($location) == string {
51
+ $location: 1;
52
+ }
53
+
54
+ // Find the columns and gutters
55
+ $columns: find-grid($columns);
56
+ $gutter: find-gutter($gutter);
57
+
58
+ // Combine the columns and gutters
59
+ $gutter: (column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1;
60
+
61
+ margin-left: $gutter;
62
+ }
63
+
64
+ @mixin isolate-float($span, $location, $columns: false, $gutter: false) {
65
+
66
+ // Find the columns and gutters
67
+ $columns: find-grid($columns);
68
+ $gutter: find-gutter($gutter);
69
+
70
+ @include push-float($span, $location, $columns, $gutter);
71
+ margin-right: -100%;
72
+ }
@@ -0,0 +1,16 @@
1
+ @mixin output-isolation($span, $location, $columns, $gutter) {
2
+ @include output-float($span, $location, $columns, $gutter);
3
+
4
+ @if not end-row($span, $location, $columns) {
5
+ @include isolate-float($location - 1, 1, $columns, $gutter);
6
+ }
7
+
8
+ }
9
+
10
+ @mixin push-isolation($span, $location, $columns: false, $gutter: false) {
11
+ @include push-float($span, $location, $columns, $gutter);
12
+ }
13
+
14
+ @mixin pull-isolation($span, $location, $columns: false, $gutter: false) {
15
+ @include pull-float($span, $location, $columns, $gutter);
16
+ }
@@ -0,0 +1,10 @@
1
+ @function add-grid($grid-definition) {
2
+ $parsed: parse-add($grid-definition);
3
+
4
+ @if nth($parsed, 2) == false and length($grids) == 0 {
5
+ @return nth($parsed, 1);
6
+ }
7
+ @else {
8
+ @return append($grids, (nth($parsed, 1) nth($parsed, 2)), 'comma');
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ //////////////////////////////
2
+ // Find Grid
3
+ //
4
+ // Finds the grid that you are on.
5
+ // From Singularity
6
+ // Must be using Breakpoint to work properly
7
+ //////////////////////////////
8
+ @function find-grid($user-columns: false) {
9
+ @return find-object($grids, $user-columns);
10
+ }
@@ -0,0 +1,10 @@
1
+ @function add-gutter($gutter-definition) {
2
+ $parsed: parse-add($gutter-definition);
3
+
4
+ @if nth($parsed, 2) == false and length($gutters) == 0 {
5
+ @return nth($parsed, 1);
6
+ }
7
+ @else {
8
+ @return append($gutters, (nth($parsed, 1) nth($parsed, 2)), 'comma');
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ //////////////////////////////
2
+ // Find gutter
3
+ //
4
+ // Finds the gutter that you are on.
5
+ // From Singularity
6
+ // Must be using Breakpoint to work properly
7
+ //////////////////////////////
8
+ @function find-gutter($user-gutter: false) {
9
+ @return find-object($gutters, $user-gutter);
10
+ }
@@ -0,0 +1,65 @@
1
+ @import "compass/css3/images";
2
+
3
+ @mixin background-grid($columns: false, $gutter: false, $color: rgba(#69aedb, .5)) {
4
+
5
+ $background-length: length($grids);
6
+
7
+ @if not ($columns) {
8
+ @for $i from 1 through $background-length {
9
+ @if $i == 1 {
10
+ @include background-build($columns, $gutter, $color);
11
+ }
12
+ @else {
13
+ $mq: nth(nth($grids, $i), 2);
14
+
15
+ $grid: nth(nth($grids, $i), 1);
16
+ @include breakpoint($mq) {
17
+ @include background-build($grid, $gutter, $color);
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+
24
+ @mixin background-build($columns, $gutter, $color) {
25
+ $columns: find-grid($columns);
26
+ $gutter: find-gutter($gutter);
27
+
28
+ $stops: background-gradient-stops($columns, $gutter, $color);
29
+
30
+ @include background(
31
+ linear-gradient(
32
+ left, $stops
33
+ )
34
+ );
35
+ }
36
+
37
+ //////////////////////////////
38
+ // Get the stops of the gradient
39
+ //////////////////////////////
40
+ @function background-gradient-stops($columns, $gutter, $color) {
41
+ $bkg: ();
42
+ $count: column-count($columns);
43
+
44
+ @for $i from 1 through column-count($columns) {
45
+ $bkg: join($bkg, background-column-gradient($i, $columns, $gutter, $color), comma);
46
+ }
47
+
48
+ @return $bkg;
49
+ }
50
+
51
+ //////////////////////////////
52
+ // Get the columns
53
+ //////////////////////////////
54
+ @function background-column-gradient($location, $columns, $gutter, $color) {
55
+
56
+ @if $location == 1 {
57
+ @return $color 0%, $color column-span(1, 1, $columns), transparentize($color, 1) column-span(1, 1, $columns);
58
+ }
59
+ @if $location == column-count($columns) {
60
+ @return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color 100%;
61
+ }
62
+ @if $location > 1 {
63
+ @return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location, 1, $columns), transparentize($color, 1) column-span($location, 1, $columns);
64
+ }
65
+ }
@@ -0,0 +1,25 @@
1
+ @import "compass/css3/shared";
2
+
3
+ @mixin box-sizing($bs) {
4
+ $bs: unquote($bs);
5
+ @include experimental(box-sizing, $bs,
6
+ -moz, -webkit, not -o, not -ms, not -khtml, official
7
+ );
8
+
9
+ @if $bs == 'border-box' {
10
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
11
+ *behavior: url("../behaviors/box-sizing/boxsizing.php");
12
+ }
13
+ }
14
+ @else {
15
+ *behavior: none;
16
+ }
17
+ }
18
+
19
+ %border-box {
20
+ @include box-sizing('border-box');
21
+ }
22
+
23
+ %content-box {
24
+ @include box-sizing('content-box');
25
+ }
@@ -0,0 +1,51 @@
1
+ $legacy-support-for-ie6: false !default;
2
+ $legacy-support-for-ie7: false !default;
3
+ $legacy-support-for-mozilla: false !default;
4
+
5
+ @mixin clearfix {
6
+ @if $legacy-support-for-ie6 and $legacy-support-for-ie7 and not $legacy-support-for-mozilla {
7
+ /* for IE 6/7 */
8
+ *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
9
+ /* non-JS fallback */
10
+ *zoom: 1;
11
+
12
+ &:before,
13
+ &:after {
14
+ content: "";
15
+ display: table;
16
+ }
17
+
18
+ &:after {
19
+ clear: both;
20
+ }
21
+ }
22
+ @else if $legacy-support-for-ie6 and $legacy-support-for-ie7 and $legacy-support-for-mozilla {
23
+ /* for IE 6/7 */
24
+ *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
25
+ /* non-JS fallback */
26
+ *zoom: 1;
27
+
28
+ &:before,
29
+ &:after {
30
+ content: ".";
31
+ display: block;
32
+ height: 0;
33
+ overflow: hidden;
34
+ }
35
+
36
+ &:after {
37
+ clear: both;
38
+ }
39
+ }
40
+ @else {
41
+ &:after {
42
+ content: "";
43
+ display: table;
44
+ clear: both;
45
+ }
46
+ }
47
+ }
48
+
49
+ %clearfix {
50
+ @include clearfix;
51
+ }
@@ -0,0 +1,15 @@
1
+ @function end-row($span, $location, $columns) {
2
+ $columns: find-grid($columns);
3
+
4
+ @if $location == 'last' or $location == 'omega' {
5
+ @return true;
6
+ }
7
+ @else {
8
+ @if $location + ($span - 1) == column-count($columns) {
9
+ @return true;
10
+ }
11
+ @else {
12
+ @return false;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,63 @@
1
+ //////////////////////////////
2
+ // Find Object
3
+ //
4
+ // Finds relevant object
5
+ // From Singularity
6
+ // Must be using Breakpoint to work properly
7
+ //////////////////////////////
8
+ @function find-object($haystack, $user-object: false) {
9
+ $length: length($haystack);
10
+
11
+ @if $user-object != false {
12
+ @return $user-object;
13
+ }
14
+ @else if $length > 1 {
15
+ $query-min: breakpoint-get-context('min-width');
16
+ $query-max: breakpoint-get-context('max-width');
17
+
18
+ // If we've got a min-width or max-width
19
+ @if $query-min or $query-max {
20
+ // Reverse the grid so we can step through it
21
+ $reverse-haystack: ();
22
+ @for $i from 2 through $length {
23
+ $reverse-haystack: append($reverse-haystack, nth($haystack, $i), comma);
24
+ }
25
+ $reverse-haystack: reverse($reverse-haystack);
26
+ $rg-length: $length - 1;
27
+
28
+ // Grab the largest and smallest MQs
29
+ $smallest: nth(nth($haystack, 2), 2);
30
+ $largest: nth(nth($reverse-haystack, 1), 2);
31
+ $context: $query-min;
32
+
33
+ // @if not ($mobile-first) {
34
+ // $context: $query-max;
35
+ // }
36
+
37
+ // If it's smallest than the smallest MQ, use the 1st grid
38
+ @if $context < $smallest {
39
+ @return nth($haystack, 1);
40
+ }
41
+ // If it's larger than or equal to the largest MQ, use the last grid
42
+ @else if $context >= $largest {
43
+ @return nth(nth($reverse-haystack, 1), 1);
44
+ }
45
+ @else {
46
+ // Loop through each MQ. If the MQ is greather than or equal to the the MQ in question, use it!
47
+ @for $j from 1 through $rg-length {
48
+ $query: nth(nth($reverse-haystack, $j), 2);
49
+ @if $context >= $query {
50
+ @return nth(nth($reverse-haystack, $j), 1);
51
+ }
52
+ }
53
+ }
54
+
55
+ }
56
+ @else {
57
+ @return nth($haystack, 1);
58
+ }
59
+ }
60
+ @else {
61
+ @return nth($haystack, 1);
62
+ }
63
+ }
@@ -0,0 +1,71 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Sass List Helpers
3
+ //
4
+ // - list-sum()
5
+ // - query-list()
6
+
7
+ // ---------------------------------------------------------------------------
8
+ // Functions
9
+
10
+ // Return the sum of all items in a list.
11
+ //
12
+ // list-sum($list)
13
+ // - $list : <list>
14
+ @function list-sum($list) {
15
+ $sum: 0;
16
+ @each $item in $list {
17
+ $sum: $sum + $item;
18
+ }
19
+ @return $sum;
20
+ }
21
+
22
+ // Return list of index locations where a query appears in a list,
23
+ // including unit queries.
24
+ //
25
+ // query-list($list, $query [, $mode])
26
+ // - $list : <list>
27
+ // - $query : <anything>
28
+ // - $mode : none | unit
29
+ // - "none" (default) runs a standard query.
30
+ // - "unit" finds all items with the same unit.
31
+ @function query-list(
32
+ $list,
33
+ $query,
34
+ $mode: none
35
+ ) {
36
+ $return: ();
37
+
38
+ // loop through $list
39
+ @for $i from 1 through length($list) {
40
+ @if $mode == unit {
41
+ // if the list item matches the query, write where it is to the list.
42
+ @if unit(nth($list, $i)) == $query {
43
+ $return: append($return, $i);
44
+ }
45
+ }
46
+ @else {
47
+ // if the list item matches the query, write where it is to the list.
48
+ @if nth(nth($list, $i), 1) == $query {
49
+ $return: append($return, $i);
50
+ }
51
+ }
52
+ }
53
+
54
+ // if nothing matches then return false.
55
+ @if $return == () {
56
+ $return: false;
57
+ }
58
+
59
+ // return list.
60
+ @return $return;
61
+ }
62
+
63
+ // Reverses direction of a list
64
+ @function reverse($list) {
65
+ $length: length($list);
66
+ $return: ();
67
+ @for $i from 0 to $length {
68
+ $return: append($return, nth($list, $length - $i), comma);
69
+ }
70
+ @return $return;
71
+ }