children-of-ie 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,19 @@
1
+ require 'compass'
2
+ Compass::Frameworks.register("children-of-ie", :path => "#{File.dirname(__FILE__)}/..")
3
+
4
+ # Sass script string parsing
5
+ module Sass::Script::Functions
6
+ def remove_nth(input)
7
+ n = "n"
8
+ b = ""
9
+ result = input.value.gsub(n, b)
10
+ Sass::Script::Number.new(result.to_i)
11
+ end
12
+ end
13
+
14
+ module ChildrenOfIe
15
+
16
+ VERSION = "0.0.1"
17
+ DATE = "2012-12-12"
18
+
19
+ end
@@ -0,0 +1,22 @@
1
+ @function nth-child($n) {
2
+
3
+ // If a single number for nth.
4
+ @if type-of($n) == number {
5
+ $nth-child: first-child;
6
+ @for $i from 2 through $n {
7
+ $nth-child: append($nth-child, #{"+ *"});
8
+ }
9
+ @return #{":"}$nth-child;
10
+ }
11
+
12
+ // If a nth-child string, need to parse the string.
13
+ @else {
14
+ $n: nth(remove-nth($n), 1);
15
+ $nth-child: ();
16
+ @for $i from 2 through $n {
17
+ $nth-child: append($nth-child, #{"+ *"});
18
+ }
19
+ @return $nth-child;
20
+ }
21
+ }
22
+
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: children-of-ie
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Scott Kellum
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.12.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.12.1
30
+ description: nth-child support for IE 7 and 8
31
+ email:
32
+ - scott@scottkellum.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - lib/children-of-ie.rb
38
+ - stylesheets/_children-of-ie.scss
39
+ homepage: https://github.com/scottkellum/children-of-ie
40
+ licenses: []
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: 1.3.6
57
+ requirements: []
58
+ rubyforge_project:
59
+ rubygems_version: 1.8.24
60
+ signing_key:
61
+ specification_version: 3
62
+ summary: nth-child support for IE 7 and 8
63
+ test_files: []