children-of-ie 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ Compass::Frameworks.register("children-of-ie", :path => "#{File.dirname(__FILE__
3
3
 
4
4
  # Sass script string parsing
5
5
  module Sass::Script::Functions
6
- def remove_nth(input)
6
+ def children_of_ie_nth(input)
7
7
  n = "n"
8
8
  b = ""
9
9
  result = input.value.gsub(n, b)
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  module ChildrenOfIe
15
15
 
16
- VERSION = "0.0.1"
16
+ VERSION = "0.0.2"
17
17
  DATE = "2012-12-12"
18
18
 
19
19
  end
@@ -1,22 +1,26 @@
1
+ ////////////////////////
2
+ // nth-child() support for IE 7 and 8
3
+ ////////////////////////
4
+
1
5
  @function nth-child($n) {
2
6
 
3
7
  // If a single number for nth.
4
8
  @if type-of($n) == number {
5
9
  $nth-child: first-child;
6
10
  @for $i from 2 through $n {
7
- $nth-child: append($nth-child, #{"+ *"});
11
+ $nth-child: append($nth-child, #{"+*"});
8
12
  }
9
13
  @return #{":"}$nth-child;
10
14
  }
11
15
 
12
16
  // If a nth-child string, need to parse the string.
13
17
  @else {
14
- $n: nth(remove-nth($n), 1);
15
- $nth-child: ();
18
+ $n: nth(children-of-ie-nth($n), 1);
19
+ $nth-child: first-child;
16
20
  @for $i from 2 through $n {
17
- $nth-child: append($nth-child, #{"+ *"});
21
+ $nth-child: append($nth-child, #{"~*"});
18
22
  }
19
- @return $nth-child;
23
+ @return #{":"}$nth-child;
20
24
  }
21
25
  }
22
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: children-of-ie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: