SassyLists 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +1 -0
- data/lib/SassyLists.rb +1 -1
- data/stylesheets/SassyLists/_remove.scss +1 -1
- data/stylesheets/SassyLists/_replace.scss +9 -5
- 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.3.
|
8
|
+
VERSION = "0.3.2"
|
9
9
|
DATE = "2013-11-05"
|
10
10
|
end
|
11
11
|
|
@@ -2,8 +2,6 @@
|
|
2
2
|
// -------------------------------------------------------------------------------
|
3
3
|
// @documentation http://sassylists.com/documentation.html#replace
|
4
4
|
// -------------------------------------------------------------------------------
|
5
|
-
// @dependence `purge()`
|
6
|
-
// -------------------------------------------------------------------------------
|
7
5
|
// @example replace( (a, b, c), b, z ) => a, z, c
|
8
6
|
// @example replace( (a, b, c), y, z ) => a, b, c
|
9
7
|
// @example replace( (a, b, c a), a, z ) => z, b, c z
|
@@ -20,14 +18,20 @@
|
|
20
18
|
$result: ();
|
21
19
|
|
22
20
|
@each $item in $list {
|
23
|
-
@if
|
21
|
+
@if $item == $old-value {
|
22
|
+
@if $new-value != '' and $new-value != null {
|
23
|
+
$result: append($result, $new-value);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@else if length($item) > 1 and $recursive {
|
24
28
|
$result: append($result, replace($item, $old-value, $new-value, $recursive));
|
25
29
|
}
|
26
30
|
|
27
31
|
@else {
|
28
|
-
$result: append($result,
|
32
|
+
$result: append($result, $item);
|
29
33
|
}
|
30
34
|
}
|
31
35
|
|
32
|
-
@return
|
36
|
+
@return $result;
|
33
37
|
}
|