SassyLists 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +1 -0
- data/lib/SassyLists.rb +1 -1
- data/stylesheets/SassyLists/_intersection.scss +14 -15
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/lib/SassyLists.rb
CHANGED
@@ -5,7 +5,7 @@ Compass::Frameworks.register('SassyLists', :path => extension_path)
|
|
5
5
|
# Version is a number. If a version contains alphas, it will be created as a prerelease version
|
6
6
|
# Date is in the form of YYYY-MM-DD
|
7
7
|
module SassyLists
|
8
|
-
VERSION = "0.4.
|
8
|
+
VERSION = "0.4.1"
|
9
9
|
DATE = "2013-11-11"
|
10
10
|
end
|
11
11
|
|
@@ -1,28 +1,27 @@
|
|
1
|
-
// Returns a list of shared value from $lists minus duplicates
|
1
|
+
// Returns a list of shared value from $list and $lists minus duplicates
|
2
2
|
// -------------------------------------------------------------------------------
|
3
3
|
// @documentation http://sassylists.com/documentation/#intersection
|
4
4
|
// -------------------------------------------------------------------------------
|
5
|
-
// @
|
6
|
-
// @dependence `flatten()`
|
5
|
+
// @example intersection(a b c d, a c d, e d a f) => a d
|
7
6
|
// -------------------------------------------------------------------------------
|
8
|
-
// @
|
9
|
-
//
|
10
|
-
// @param $lists [ArgList] : lists
|
7
|
+
// @param $list [List] : first list
|
8
|
+
// @param $lists [ArgList] : other lists
|
11
9
|
// -------------------------------------------------------------------------------
|
12
10
|
// @return [List]
|
13
11
|
|
14
|
-
@function intersection($lists...) {
|
15
|
-
|
16
|
-
@return $lists;
|
17
|
-
}
|
12
|
+
@function intersection($list, $lists...) {
|
13
|
+
$result: $list;
|
18
14
|
|
19
|
-
$list
|
20
|
-
|
15
|
+
@each $list in $lists {
|
16
|
+
$temp: ();
|
21
17
|
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
@each $item in $result {
|
19
|
+
@if not not index($list, $item) {
|
20
|
+
$temp: append($temp, $item);
|
21
|
+
}
|
25
22
|
}
|
23
|
+
|
24
|
+
$result: $temp;
|
26
25
|
}
|
27
26
|
|
28
27
|
@return $result;
|