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 +4 -4
- data/VERSION +1 -1
- data/docs/changelog.rst +15 -1
- data/sass/susy/_math.scss +1 -4
- data/sass/susy/language/_susy.scss +2 -0
- data/sass/susy/language/_susyone.scss +3 -1
- data/sass/susy/math/_su.scss +7 -0
- data/sass/susy/math/{_columns.scss → su/_grid.scss} +56 -15
- data/sass/susy/math/{_maps.scss → su/_maps.scss} +0 -0
- data/sass/susy/math/{_settings.scss → su/_settings.scss} +0 -5
- data/sass/susy/math/{_validation.scss → su/_validation.scss} +8 -3
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d596116854611c65dd0359ef05187bb0828a1e97
|
4
|
+
data.tar.gz: 87578160029e758da8e07c52e23903e889e1e3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a675b09d9def187b2ba942bdb31035323a9dd97f846f77b0e2f340372cd0d73a800ef0fd836ec4da786d1c55c7b4c52f57205b573c4fa3884edbd70f1bc1055b
|
7
|
+
data.tar.gz: 659275cd3214d5b7430bebe88393ff713230d255e9fe44d72f8dfda65784d350e84b6f84ef3940e5a6c682052b7b513e9a73fff7719ccfad31c439c853bb65bd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.0
|
data/docs/changelog.rst
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
-
|
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,
|
data/sass/susy/_math.scss
CHANGED
@@ -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";
|
@@ -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
|
-
|
16
|
-
//
|
16
|
+
|
17
|
+
// Susy Count
|
18
|
+
// ----------
|
17
19
|
// Find the number of columns in a given layout
|
18
20
|
// - [$columns] : <number> | <list>
|
19
|
-
@function
|
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
|
-
|
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
|
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: (
|
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
|
-
|
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
|
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
|
-
|
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
|
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:
|
125
|
+
$span: susy-slice($span, $location, $columns);
|
126
|
+
|
127
|
+
@return susy-sum($span, $gutters, $spread);
|
128
|
+
}
|
96
129
|
|
97
|
-
|
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
|
}
|
File without changes
|
@@ -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:
|
18
|
+
$fail: null;
|
18
19
|
@each $col in $columns {
|
19
|
-
|
20
|
-
|
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.
|
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/
|
80
|
-
- sass/susy/math/
|
81
|
-
- sass/susy/math/
|
82
|
-
- sass/susy/math/
|
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
|