susy 2.0.0.alpha.2 → 2.0.0.alpha.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/lib/susy.rb +0 -10
  3. data/sass/_susy.scss +2 -2
  4. data/sass/susy/_core.scss +3 -3
  5. data/sass/susy/_helpers.scss +2 -3
  6. data/sass/susy/_math.scss +2 -2
  7. data/sass/susy/_settings.scss +4 -39
  8. data/sass/susy/api/_float.scss +2 -2
  9. data/sass/susy/api/_shared.scss +2 -2
  10. data/sass/susy/api/float/_container.scss +9 -5
  11. data/sass/susy/api/float/_end.scss +8 -4
  12. data/sass/susy/api/float/_isolate.scss +7 -3
  13. data/sass/susy/api/float/_span.scss +18 -4
  14. data/sass/susy/api/shared/_container.scss +10 -6
  15. data/sass/susy/api/shared/_grid-background.scss +30 -7
  16. data/sass/susy/api/shared/_margins.scss +9 -5
  17. data/sass/susy/api/shared/_padding.scss +9 -5
  18. data/sass/susy/helpers/_direction.scss +11 -1
  19. data/sass/susy/helpers/_nth.scss +4 -0
  20. data/sass/susy/language/_shared.scss +2 -3
  21. data/sass/susy/language/_susy.scss +5 -4
  22. data/sass/susy/language/shared/_context.scss +10 -9
  23. data/sass/susy/language/shared/_settings.scss +181 -101
  24. data/sass/susy/language/susy/_background.scss +84 -75
  25. data/sass/susy/language/susy/_container.scss +57 -77
  26. data/sass/susy/language/susy/_gallery.scss +46 -67
  27. data/sass/susy/language/susy/_gutters.scss +117 -0
  28. data/sass/susy/language/susy/_isolate.scss +21 -14
  29. data/sass/susy/language/susy/_margins.scss +92 -0
  30. data/sass/susy/language/susy/_padding.scss +68 -0
  31. data/sass/susy/language/susy/_rows.scss +43 -15
  32. data/sass/susy/language/susy/_span.scss +198 -61
  33. data/sass/susy/language/susy1/_settings.scss +13 -23
  34. data/sass/susy/math/_columns.scss +26 -3
  35. data/sass/susy/math/_container.scss +17 -12
  36. data/sass/susy/math/_location.scss +13 -0
  37. metadata +8 -35
  38. data/sass/susy/helpers/_sass-lists.scss +0 -90
  39. data/sass/susy/language/susy/_functions.scss +0 -58
  40. data/sass/susy/language/susy/_math.scss +0 -153
@@ -1,153 +0,0 @@
1
- // Susy Math
2
- // =========
3
-
4
- // Get all the span results
5
- @function span-math(
6
- $span,
7
- $location,
8
- $columns : $columns,
9
- $gutters : $gutters,
10
- $column-width : $column-width,
11
- $isolate : $isolate,
12
- $static : $static,
13
- $flow : $flow,
14
- $gutter-place : $gutter-placement,
15
- $is-container : false,
16
- $gutter-override : false
17
- ) {
18
- $float : from($flow);
19
- $width : $span;
20
-
21
- $column : null;
22
- $padding-before : null;
23
- $padding-after : null;
24
- $margin-before : null;
25
- $margin-after : null;
26
-
27
- $static : if($static and $static != fluid, true, false);
28
- $isolate : if($isolate and $isolate != float, true, false);
29
-
30
- // calculations
31
- $width: get-span-width($span, $location, $columns, $gutters, $column-width, $static, $gutter-place);
32
-
33
- // gutter location
34
- $gutter-location : get-gutters($columns, $gutters, $column-width, $static, $gutter-place, $gutter-override);
35
-
36
- @if $gutter-place == inside {
37
- @if not $is-container {
38
- $padding-before: nth($gutter-location,1);
39
- $padding-after: nth($gutter-location,2);
40
- }
41
- } @else {
42
- $margin-before: nth($gutter-location,1);
43
- $margin-after: nth($gutter-location,2);
44
- }
45
-
46
- // special margin handling
47
- @if $isolate {
48
- $margin-before: get-isolation($span, $location, $columns, $gutters, $column-width, $static);
49
- $margin-after: -100%;
50
- } @else {
51
- @if is-last($span, $location, $columns) {
52
- $float: to($flow);
53
- $margin-after: null;
54
- } @else if is-first($location) {
55
- $margin-before: null;
56
- }
57
- }
58
-
59
- @return $width $float $margin-before $margin-after $padding-before $padding-after $flow;
60
- }
61
-
62
- // Return gutter width
63
- @function get-gutter-width(
64
- $columns : $columns,
65
- $gutters : $gutters,
66
- $column-width : $columns-width,
67
- $static : $static
68
- ) {
69
- $context : column-sum($columns, $gutters);
70
- $gutter : null;
71
-
72
- @if $static {
73
- @if $column-width {
74
- $gutter: $gutters * $column-width;
75
- } @else {
76
- @warn "Please set a $column-width to use for static output.";
77
- }
78
- } @else {
79
- $gutter: percentage($gutters / $context);
80
- }
81
-
82
- @return $gutter;
83
- }
84
-
85
- @function get-gutters(
86
- $columns : $columns,
87
- $gutters : $gutters,
88
- $column-width : $column-width,
89
- $static : $static,
90
- $gutter-place : $gutter-placement,
91
- $gutter-override : false
92
- ) {
93
- $static : if($gutter-place == inside and $column-width, true, $static);
94
- $gutter : null;
95
- $before : null;
96
- $after : null;
97
-
98
- @if $gutter-override {
99
- $gutter: $gutter-override;
100
- } @else {
101
- $gutter: get-gutter-width($columns, $gutters, $column-width, $static);
102
- }
103
-
104
- @if $gutter-place == before {
105
- $before: $gutter;
106
- } @else if $gutter-place == after {
107
- $after: $gutter;
108
- } @else if $gutter-place == split or $gutter-place == inside {
109
- $gutter: if($gutter-override, $gutter, $gutter / 2);
110
- $before: $gutter;
111
- $after: $gutter;
112
- }
113
-
114
- @return $before $after;
115
- }
116
-
117
- // Return span width
118
- @function get-span-width(
119
- $span,
120
- $location,
121
- $columns : $columns,
122
- $gutters : $gutters,
123
- $column-width : $column-width,
124
- $static : $static,
125
- $gutter-place : $gutter-placement,
126
- $outer : null
127
- ) {
128
- $context : null;
129
- $span-sum : null;
130
- $width : null;
131
-
132
- @if unitless($span) {
133
- @if $gutter-place == inside {
134
- $context: column-sum($columns, $gutters, outer);
135
- $span-sum: column-sum(get-columns($span, $location, $columns), $gutters, outer);
136
- } @else {
137
- $context: column-sum($columns, $gutters);
138
- $outer: if($outer, $gutters, 0);
139
- $span-sum: get-column-span-sum($span, $location, $columns, $gutters) + $outer;
140
- }
141
-
142
- @if $static {
143
- $width: $span-sum * $column-width;
144
- } @else {
145
- $width: percentage($span-sum / $context);
146
- }
147
- } @else {
148
- $width: $span;
149
- }
150
-
151
- @return $width;
152
- }
153
-