susy 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6f0703eaf4d2da077dae12a6cc87086bc68788e
4
- data.tar.gz: 0d2a5410f36d02ebf68f4149af66e7658dfd89b0
3
+ metadata.gz: d596116854611c65dd0359ef05187bb0828a1e97
4
+ data.tar.gz: 87578160029e758da8e07c52e23903e889e1e3fb
5
5
  SHA512:
6
- metadata.gz: e3f227a8dc3d4cff8512a2ab2aaa637e9863ca16d941c4d3d6cd0084019501edd098f089c7b8b67dcb77fed5c417f7b98814e8cb3a7cb0d4b273fc24100af8df
7
- data.tar.gz: b16019c24a18eabfbf85188230c489b4b5db282d756d781ed7abe4e06719b883806afbffc58d44678a0fc72d93807f3ca0740ea5217f52ef18d1bf019d9516c3
6
+ metadata.gz: a675b09d9def187b2ba942bdb31035323a9dd97f846f77b0e2f340372cd0d73a800ef0fd836ec4da786d1c55c7b4c52f57205b573c4fa3884edbd70f1bc1055b
7
+ data.tar.gz: 659275cd3214d5b7430bebe88393ff713230d255e9fe44d72f8dfda65784d350e84b6f84ef3940e5a6c682052b7b513e9a73fff7719ccfad31c439c853bb65bd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -1,7 +1,21 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- 2.0.0 — Mar 10 2013
4
+
5
+ 2.1.0 - Mar 13 2014
6
+ -------------------
7
+
8
+ - Rename core math functions, and prepare for decomposition.
9
+
10
+ + ``column-count()`` => ``susy-count()``
11
+ + ``column-sum()`` => ``susy-sum()``
12
+ + ``column-span()`` => ``susy-slice()``
13
+ + ``column-span-sum()`` => ``susy()``
14
+
15
+ - Add tests for core math validation.
16
+
17
+
18
+ 2.0.0 — Mar 10 2014
5
19
  -------------------
6
20
 
7
21
  - New susyone tests for split-columns, is-default-layout, medialayout, columns,
@@ -1,7 +1,4 @@
1
1
  // Math
2
2
  // ====
3
3
 
4
- @import "math/maps";
5
- @import "math/settings";
6
- @import "math/validation";
7
- @import "math/columns";
4
+ @import "math/su";
@@ -1,6 +1,8 @@
1
1
  // Susy Next Syntax
2
2
  // ================
3
3
 
4
+ $susy-version: 2.0;
5
+
4
6
  @import "../math";
5
7
  @import "../output/float";
6
8
 
@@ -1,6 +1,8 @@
1
1
  // ---------------------------------------------------------------------------
2
2
  // Partials
3
3
 
4
+ $susy-version: 1.5;
5
+
4
6
  @import "susyone/settings";
5
7
  @import "susyone/functions";
6
8
  @import "susyone/grid";
@@ -8,4 +10,4 @@
8
10
  @import "susyone/padding";
9
11
  @import "susyone/margin";
10
12
  @import "susyone/media";
11
- @import "susyone/background";
13
+ @import "susyone/background";
@@ -0,0 +1,7 @@
1
+ // Su
2
+ // ==
3
+
4
+ @import "su/maps";
5
+ @import "su/settings";
6
+ @import "su/validation";
7
+ @import "su/grid";
@@ -1,6 +1,7 @@
1
1
  // Column math
2
2
  // ===========
3
3
 
4
+
4
5
  // Is Symmetrical
5
6
  // --------------
6
7
  // Returns true if a grid is symmetrical.
@@ -12,24 +13,33 @@
12
13
  @return if(type-of($columns) == number, $columns, null);
13
14
  }
14
15
 
15
- // Columns Count
16
- // -------------
16
+
17
+ // Susy Count
18
+ // ----------
17
19
  // Find the number of columns in a given layout
18
20
  // - [$columns] : <number> | <list>
19
- @function column-count(
21
+ @function susy-count(
20
22
  $columns: map-get($susy-defaults, columns)
21
23
  ) {
22
24
  $columns: valid-columns($columns);
23
25
  @return is-symmetrical($columns) or length($columns);
24
26
  }
25
27
 
26
- // Column Sum
27
- // ----------
28
+ @function column-count(
29
+ $columns: map-get($susy-defaults, columns)
30
+ ) {
31
+ @warn "[function] column-count() has been renamed susy-count().";
32
+ @return susy-count($columns);
33
+ }
34
+
35
+
36
+ // Susy Sum
37
+ // --------
28
38
  // Find the total sum of column-units in a layout
29
39
  // - [$columns] : <number> | <list>
30
40
  // - [$gutters] : <ratio>
31
41
  // - [$spread] : false/narrow | wide | wider
32
- @function column-sum(
42
+ @function susy-sum(
33
43
  $columns : map-get($susy-defaults, columns),
34
44
  $gutters : map-get($susy-defaults, gutters),
35
45
  $spread : false
@@ -38,7 +48,7 @@
38
48
  $gutters: valid-gutters($gutters);
39
49
 
40
50
  $spread: if($spread == wide, 0, if($spread == wider, 1, -1));
41
- $gutter-sum: (column-count($columns) + $spread) * $gutters;
51
+ $gutter-sum: (susy-count($columns) + $spread) * $gutters;
42
52
  $column-sum: is-symmetrical($columns);
43
53
 
44
54
  @if not $column-sum {
@@ -50,13 +60,23 @@
50
60
  @return $column-sum + $gutter-sum;
51
61
  }
52
62
 
53
- // Column Span
54
- // -----------
63
+ @function column-sum(
64
+ $columns : map-get($susy-defaults, columns),
65
+ $gutters : map-get($susy-defaults, gutters),
66
+ $spread : false
67
+ ) {
68
+ @warn "[function] column-sum() has been renamed susy-sum().";
69
+ @return susy-sum($columns, $gutters, $spread);
70
+ }
71
+
72
+
73
+ // Susy Slice
74
+ // ----------
55
75
  // Return a subset of columns at a given location.
56
76
  // - $span : <number>
57
77
  // - $location : <number>
58
78
  // - [$columns] : <number> | <list>
59
- @function column-span(
79
+ @function susy-slice(
60
80
  $span,
61
81
  $location,
62
82
  $columns: map-get($susy-defaults, columns)
@@ -75,15 +95,25 @@
75
95
  @return $sub-columns;
76
96
  }
77
97
 
78
- // Column Span Sum
79
- // ---------------
98
+ @function column-span(
99
+ $span,
100
+ $location,
101
+ $columns: map-get($susy-defaults, columns)
102
+ ) {
103
+ @warn "[function] column-span() has been renamed susy-slice().";
104
+ @return susy-slice($span, $location, $columns);
105
+ }
106
+
107
+
108
+ // Susy
109
+ // ----
80
110
  // Find the sum of a column-span.
81
111
  // - $span : <number>
82
112
  // - $location : <number>
83
113
  // - [$columns] : <number> | <list>
84
114
  // - [$gutters] : <ratio>
85
115
  // - [$spread] : false/narrow | wide | wider
86
- @function column-span-sum(
116
+ @function susy(
87
117
  $span,
88
118
  $location : false,
89
119
  $columns : map-get($susy-defaults, columns),
@@ -92,7 +122,18 @@
92
122
  ) {
93
123
  $columns: valid-columns($columns);
94
124
  $gutters: valid-gutters($gutters);
95
- $span: column-span($span, $location, $columns);
125
+ $span: susy-slice($span, $location, $columns);
126
+
127
+ @return susy-sum($span, $gutters, $spread);
128
+ }
96
129
 
97
- @return column-sum($span, $gutters, $spread);
130
+ @function column-span-sum(
131
+ $span,
132
+ $location : false,
133
+ $columns : map-get($susy-defaults, columns),
134
+ $gutters : map-get($susy-defaults, gutters),
135
+ $spread : false
136
+ ) {
137
+ @warn "[function] column-span-sum() has been renamed susy().";
138
+ @return susy($span, $location, $columns, $gutters, $spread);
98
139
  }
@@ -1,10 +1,6 @@
1
1
  // Settings
2
2
  // ========
3
3
 
4
- // Version
5
- // -------
6
- $susy-version: 2.0;
7
-
8
4
 
9
5
  // Default Settings
10
6
  // ----------------
@@ -71,4 +67,3 @@ $susy: () !default;
71
67
 
72
68
  @return $_return;
73
69
  }
74
-
@@ -1,6 +1,7 @@
1
1
  // Math Validation
2
2
  // ===============
3
3
 
4
+
4
5
  // Valid Columns
5
6
  // -------------
6
7
  // Check that a column setting is valid.
@@ -14,10 +15,13 @@
14
15
  @if $type == number and unitless($columns) {
15
16
  $return: $columns;
16
17
  } @else if $type == list {
17
- $fail: false;
18
+ $fail: null;
18
19
  @each $col in $columns {
19
- $number: if(type-of($col == number), true, null);
20
- $fail: $fail or if($number and unitless($col), null, true);
20
+ @if type-of($col) == number {
21
+ $fail: $fail or if(unitless($col), null, true);
22
+ } @else {
23
+ $fail: true;
24
+ }
21
25
  }
22
26
  $return: if($fail, $return, $columns);
23
27
  }
@@ -31,6 +35,7 @@
31
35
  @return $return;
32
36
  }
33
37
 
38
+
34
39
  // Valid Gutters
35
40
  // -------------
36
41
  // Check that a gutter setting is valid.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: susy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Suzanne
@@ -76,10 +76,11 @@ files:
76
76
  - sass/susy/language/susyone/_media.scss
77
77
  - sass/susy/language/susyone/_padding.scss
78
78
  - sass/susy/language/susyone/_settings.scss
79
- - sass/susy/math/_columns.scss
80
- - sass/susy/math/_maps.scss
81
- - sass/susy/math/_settings.scss
82
- - sass/susy/math/_validation.scss
79
+ - sass/susy/math/_su.scss
80
+ - sass/susy/math/su/_grid.scss
81
+ - sass/susy/math/su/_maps.scss
82
+ - sass/susy/math/su/_settings.scss
83
+ - sass/susy/math/su/_validation.scss
83
84
  - sass/susy/output/_float.scss
84
85
  - sass/susy/output/_shared.scss
85
86
  - sass/susy/output/_support.scss