less 1.2.18 → 1.2.19

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.18
1
+ 1.2.19
data/less.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{less}
8
- s.version = "1.2.18"
8
+ s.version = "1.2.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["cloudhead"]
@@ -80,9 +80,14 @@ module Less
80
80
  if Functions.available.include? self.to_sym
81
81
  send to_sym, *@args
82
82
  else
83
- Node::Anonymous.new("#{to_sym}(#{@args.map(&:to_css) * ', '})")
83
+ args = @args.map { |e|
84
+ e.parent = self.parent
85
+ e = e.evaluate(context) if e.respond_to?(:evaluate)
86
+ e.to_css
87
+ } * ', '
88
+ Node::Anonymous.new("#{to_sym}(#{args})")
84
89
  end
85
90
  end
86
91
  end
87
92
  end
88
- end
93
+ end
@@ -1,5 +1,12 @@
1
- body {
2
- background: green;
1
+ .test1 {
2
+ background-image: -moz-linear-gradient(top, bottom, from(#030303), to(#010101));
3
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#030303), to(#010101));
4
+ }
5
+ .test2 {
6
+ background-image: -moz-linear-gradient(top, bottom, from(#020202), to(#010101));
7
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#020202), to(#010101));
8
+ }
9
+ .test3 {
3
10
  background-image: -moz-linear-gradient(top, bottom, from(red), to(green));
4
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, red), color-stop(1, green));
11
+ background-image: -webkit-gradient(linear, left top, left bottom, from(red), to(green));
5
12
  }
@@ -1,8 +1,21 @@
1
- @top_color: red;
2
- @bottom_color: green;
1
+ @global_color: #010101;
2
+ @red_color: red;
3
+ @green_color: green;
3
4
 
4
- body {
5
- background: @bottom_color;
6
- background-image: -moz-linear-gradient(top, bottom, from(@top_color), to(@bottom_color));
7
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, @top_color), color-stop(1.00, @bottom_color));
5
+ .gradient (@local_color: #030303) {
6
+ background-image: -moz-linear-gradient(top, bottom, from(@local_color), to(@global_color));
7
+ background-image: -webkit-gradient(linear, left top, left bottom, from(@local_color), to(@global_color));
8
+ }
9
+
10
+ .test1 {
11
+ .gradient;
12
+ }
13
+
14
+ .test2 {
15
+ .gradient(#020202);
16
+ }
17
+
18
+ .test3 {
19
+ background-image: -moz-linear-gradient(top, bottom, from(@red_color), to(@green_color));
20
+ background-image: -webkit-gradient(linear, left top, left bottom, from(@red_color), to(@green_color));
8
21
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: less
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.18
4
+ version: 1.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead