less 2.0.7 → 2.0.8beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.travis.yml +4 -1
  2. data/less.gemspec +2 -1
  3. data/lib/less/js/Makefile +13 -0
  4. data/lib/less/js/benchmark/less-benchmark.js +1 -3
  5. data/lib/less/js/bin/lessc +30 -7
  6. data/lib/less/js/build/require-rhino.js +7 -0
  7. data/lib/less/js/dist/less-1.1.5.js +2805 -0
  8. data/lib/less/js/dist/less-1.1.5.min.js +16 -0
  9. data/lib/less/js/dist/less-rhino-1.1.3.js +2460 -0
  10. data/lib/less/js/dist/less-rhino-1.1.5.js +2481 -0
  11. data/lib/less/js/lib/less/browser.js +8 -2
  12. data/lib/less/js/lib/less/functions.js +12 -1
  13. data/lib/less/js/lib/less/index.js +19 -18
  14. data/lib/less/js/lib/less/parser.js +41 -22
  15. data/lib/less/js/lib/less/rhino.js +60 -0
  16. data/lib/less/js/lib/less/tree/alpha.js +1 -1
  17. data/lib/less/js/lib/less/tree/anonymous.js +1 -1
  18. data/lib/less/js/lib/less/tree/assignment.js +17 -0
  19. data/lib/less/js/lib/less/tree/call.js +1 -1
  20. data/lib/less/js/lib/less/tree/color.js +9 -6
  21. data/lib/less/js/lib/less/tree/comment.js +1 -1
  22. data/lib/less/js/lib/less/tree/dimension.js +1 -1
  23. data/lib/less/js/lib/less/tree/directive.js +1 -1
  24. data/lib/less/js/lib/less/tree/element.js +3 -2
  25. data/lib/less/js/lib/less/tree/expression.js +1 -1
  26. data/lib/less/js/lib/less/tree/import.js +3 -3
  27. data/lib/less/js/lib/less/tree/javascript.js +1 -1
  28. data/lib/less/js/lib/less/tree/keyword.js +1 -1
  29. data/lib/less/js/lib/less/tree/mixin.js +1 -1
  30. data/lib/less/js/lib/less/tree/operation.js +1 -1
  31. data/lib/less/js/lib/less/tree/quoted.js +1 -1
  32. data/lib/less/js/lib/less/tree/rule.js +1 -1
  33. data/lib/less/js/lib/less/tree/ruleset.js +3 -3
  34. data/lib/less/js/lib/less/tree/selector.js +13 -4
  35. data/lib/less/js/lib/less/tree/url.js +2 -2
  36. data/lib/less/js/lib/less/tree/value.js +1 -1
  37. data/lib/less/js/lib/less/tree/variable.js +1 -1
  38. data/lib/less/js/lib/less/tree.js +2 -2
  39. data/lib/less/js/package.json +1 -1
  40. data/lib/less/js/test/css/colors.css +6 -0
  41. data/lib/less/js/test/css/css-3.css +14 -0
  42. data/lib/less/js/test/css/css.css +3 -0
  43. data/lib/less/js/test/css/ie-filters.css +5 -0
  44. data/lib/less/js/test/css/import.css +2 -0
  45. data/lib/less/js/test/css/mixins.css +20 -0
  46. data/lib/less/js/test/less/colors.less +6 -0
  47. data/lib/less/js/test/less/css-3.less +10 -0
  48. data/lib/less/js/test/less/css.less +4 -0
  49. data/lib/less/js/test/less/ie-filters.less +8 -0
  50. data/lib/less/js/test/less/import.less +1 -0
  51. data/lib/less/js/test/less/mixins.less +20 -0
  52. data/lib/less/js/test/less-test.js +2 -4
  53. data/lib/less/loader.rb +18 -30
  54. data/lib/less/version.rb +1 -1
  55. metadata +64 -55
@@ -80,3 +80,6 @@ p + h1 {
80
80
  kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
81
81
  background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
82
82
  }
83
+ #svg-data-uri {
84
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
85
+ }
@@ -0,0 +1,5 @@
1
+ .nav {
2
+ filter: progid:dximagetransform.microsoft.alpha(opacity=20);
3
+ filter: progid:dximagetransform.microsoft.alpha(opacity=0);
4
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr="#333333", endColorstr="#000000", GradientType=0);
5
+ }
@@ -1,4 +1,6 @@
1
1
  @import "import-test-d.css";
2
+
3
+ @import url(http://fonts.googleapis.com/css?family=Open+Sans);
2
4
  #import {
3
5
  color: red;
4
6
  }
@@ -48,3 +48,23 @@
48
48
  .direct {
49
49
  border-style: dotted;
50
50
  }
51
+ .bo, .bar {
52
+ width: 100%;
53
+ }
54
+ .bo {
55
+ border: 1px;
56
+ }
57
+ .ar.bo.ca {
58
+ color: black;
59
+ }
60
+ .jo.ki {
61
+ background: none;
62
+ }
63
+ .extended {
64
+ width: 100%;
65
+ border: 1px;
66
+ background: none;
67
+ }
68
+ .foo .bar {
69
+ width: 100%;
70
+ }
@@ -8,6 +8,9 @@
8
8
  #rgba {
9
9
  color: rgba(255, 238, 170, 0.1);
10
10
  }
11
+ #argb {
12
+ color: argb(rgba(255, 238, 170, 0.1));
13
+ }
11
14
  }
12
15
 
13
16
  #blue {
@@ -20,6 +23,9 @@
20
23
  #rgba {
21
24
  color: rgba(0, 0, 255, 0.1);
22
25
  }
26
+ #argb {
27
+ color: argb(rgba(0, 0, 255, 0.1));
28
+ }
23
29
  }
24
30
 
25
31
  #alpha #hsla {
@@ -53,3 +53,13 @@ form[data-disabled] {
53
53
  p::before {
54
54
  color: black;
55
55
  }
56
+
57
+ #issue322 {
58
+ -webkit-animation: anim2 7s infinite ease-in-out;
59
+ }
60
+
61
+ @-webkit-keyframes frames {
62
+ 0% { border: 1px }
63
+ 5.5% { border: 2px }
64
+ 100% { border: 3px }
65
+ }
@@ -94,3 +94,7 @@ p + h1 {
94
94
  kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
95
95
  background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
96
96
  }
97
+
98
+ #svg-data-uri {
99
+ background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
100
+ }
@@ -0,0 +1,8 @@
1
+ @fat: 0;
2
+ @cloudhead: "#000000";
3
+
4
+ .nav {
5
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 20);
6
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@fat);
7
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr=@cloudhead, GradientType=@fat);
8
+ }
@@ -1,5 +1,6 @@
1
1
  @import url("import/import-test-a.less");
2
2
  //@import url("import/import-test-a.less");
3
+ @import url(http://fonts.googleapis.com/css?family=Open+Sans);
3
4
 
4
5
  #import-test {
5
6
  .mixin;
@@ -45,3 +45,23 @@
45
45
  .direct {
46
46
  #namespace > .borders;
47
47
  }
48
+
49
+ .bo, .bar {
50
+ width: 100%;
51
+ }
52
+ .bo {
53
+ border: 1px;
54
+ }
55
+ .ar.bo.ca {
56
+ color: black;
57
+ }
58
+ .jo.ki {
59
+ background: none;
60
+ }
61
+ .extended {
62
+ .bo;
63
+ .jo.ki;
64
+ }
65
+ .foo .bar {
66
+ .bar;
67
+ }
@@ -1,10 +1,8 @@
1
1
  var path = require('path'),
2
2
  fs = require('fs'),
3
- sys = require('sys');
3
+ sys = require('util');
4
4
 
5
- require.paths.unshift(__dirname, path.join(__dirname, '..'));
6
-
7
- var less = require('lib/less');
5
+ var less = require('../lib/less');
8
6
 
9
7
  less.tree.functions.add = function (a, b) {
10
8
  return new(less.tree.Dimension)(a.value + b.value);
data/lib/less/loader.rb CHANGED
@@ -1,46 +1,34 @@
1
+ require 'commonjs'
1
2
 
2
3
  module Less
3
4
  class Loader
4
5
  include CallJS
5
6
 
6
7
  def initialize
7
- lock do
8
- @cxt = V8::Context.new
9
- @path = Pathname(__FILE__).dirname.join('js','lib')
10
- @exports = {
11
- "path" => Path.new,
12
- "sys" => Sys.new,
13
- "fs" => Fs.new
14
- }
15
- @process = Process.new
16
- @cxt['console'] = Console.new
17
- end
8
+ @cxt = V8::Context.new
9
+ @environment = CommonJS::Environment.new(@cxt, :path => Pathname(__FILE__).dirname.join('js','lib').to_s)
10
+ @environment.native('path', Path.new)
11
+ @environment.native('util', Sys.new)
12
+ @environment.native('fs', Fs.new)
13
+
14
+ @cxt['process'] = Process.new
15
+ @cxt['console'] = Console.new
18
16
  end
19
-
20
- def require(path)
21
- unless exports = @exports[path]
22
- filename = path =~ /\.js$/ ? path : "#{path}.js"
23
- filepath = @path.join(filename)
24
- fail LoadError, "no such file: #{filename}" unless filepath.exist?
25
- lock do
26
- load = @cxt.eval("(function(process, require, exports, __dirname) {require.paths = [];#{File.read(filepath)}})", filepath.expand_path)
27
- @exports[path] = exports = @cxt['Object'].new
28
- load.call(@process, method(:require), exports, Dir.pwd)
29
- end
30
- end
31
- return exports
17
+
18
+ def require(module_id)
19
+ @environment.require(module_id)
32
20
  end
33
-
21
+
34
22
  class Path
35
23
  def join(*components)
36
24
  File.join(*components)
37
25
  end
38
-
26
+
39
27
  def dirname(path)
40
28
  File.dirname(path)
41
29
  end
42
30
  end
43
-
31
+
44
32
  class Sys
45
33
  def error(*errors)
46
34
  raise errors.join(' ')
@@ -51,18 +39,18 @@ module Less
51
39
  def statSync(path)
52
40
  File.stat(path)
53
41
  end
54
-
42
+
55
43
  def readFile(path, encoding, callback)
56
44
  callback.call(nil, File.read(path))
57
45
  end
58
-
46
+
59
47
  end
60
48
 
61
49
  class Process
62
50
  def exit(*args)
63
51
  end
64
52
  end
65
-
53
+
66
54
  class Console
67
55
  def log(*msgs)
68
56
  puts msgs.join(',')
data/lib/less/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Less
2
- VERSION = '2.0.7'
2
+ VERSION = '2.0.8beta1'
3
3
  end
metadata CHANGED
@@ -1,61 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: less
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 2.0.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.8beta1
5
+ prerelease: 5
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Charles Lowell
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-09-20 00:00:00 -05:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-11-29 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: therubyracer
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2156298320 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: 0.9.2
20
+ - !ruby/object:Gem::Version
21
+ version: 0.9.9
24
22
  type: :runtime
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *2156298320
25
+ - !ruby/object:Gem::Dependency
26
+ name: commonjs
27
+ requirement: &2156295600 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.2.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2156295600
36
+ - !ruby/object:Gem::Dependency
28
37
  name: rake
29
- requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirement: &2156294080 !ruby/object:Gem::Requirement
30
39
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
35
44
  type: :development
36
45
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *2156294080
47
+ - !ruby/object:Gem::Dependency
39
48
  name: rspec
40
- requirement: &id003 !ruby/object:Gem::Requirement
49
+ requirement: &2156287480 !ruby/object:Gem::Requirement
41
50
  none: false
42
- requirements:
51
+ requirements:
43
52
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: "2.0"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
46
55
  type: :development
47
56
  prerelease: false
48
- version_requirements: *id003
57
+ version_requirements: *2156287480
49
58
  description: Invoke the Less CSS compiler from Ruby
50
- email:
59
+ email:
51
60
  - cowboyd@thefrontside.net
52
- executables:
61
+ executables:
53
62
  - lessc
54
63
  extensions: []
55
-
56
64
  extra_rdoc_files: []
57
-
58
- files:
65
+ files:
59
66
  - .gitignore
60
67
  - .gitmodules
61
68
  - .travis.yml
@@ -81,6 +88,7 @@ files:
81
88
  - lib/less/js/bin/lessc
82
89
  - lib/less/js/build/ecma-5.js
83
90
  - lib/less/js/build/header.js
91
+ - lib/less/js/build/require-rhino.js
84
92
  - lib/less/js/build/require.js
85
93
  - lib/less/js/dist/less-1.1.0.js
86
94
  - lib/less/js/dist/less-1.1.0.min.js
@@ -92,13 +100,19 @@ files:
92
100
  - lib/less/js/dist/less-1.1.3.min.js
93
101
  - lib/less/js/dist/less-1.1.4.js
94
102
  - lib/less/js/dist/less-1.1.4.min.js
103
+ - lib/less/js/dist/less-1.1.5.js
104
+ - lib/less/js/dist/less-1.1.5.min.js
105
+ - lib/less/js/dist/less-rhino-1.1.3.js
106
+ - lib/less/js/dist/less-rhino-1.1.5.js
95
107
  - lib/less/js/lib/less/browser.js
96
108
  - lib/less/js/lib/less/functions.js
97
109
  - lib/less/js/lib/less/index.js
98
110
  - lib/less/js/lib/less/parser.js
111
+ - lib/less/js/lib/less/rhino.js
99
112
  - lib/less/js/lib/less/tree.js
100
113
  - lib/less/js/lib/less/tree/alpha.js
101
114
  - lib/less/js/lib/less/tree/anonymous.js
115
+ - lib/less/js/lib/less/tree/assignment.js
102
116
  - lib/less/js/lib/less/tree/call.js
103
117
  - lib/less/js/lib/less/tree/color.js
104
118
  - lib/less/js/lib/less/tree/comment.js
@@ -125,6 +139,7 @@ files:
125
139
  - lib/less/js/test/css/css-escapes.css
126
140
  - lib/less/js/test/css/css.css
127
141
  - lib/less/js/test/css/functions.css
142
+ - lib/less/js/test/css/ie-filters.css
128
143
  - lib/less/js/test/css/import.css
129
144
  - lib/less/js/test/css/javascript.css
130
145
  - lib/less/js/test/css/lazy-eval.css
@@ -149,6 +164,7 @@ files:
149
164
  - lib/less/js/test/less/css-escapes.less
150
165
  - lib/less/js/test/less/css.less
151
166
  - lib/less/js/test/less/functions.less
167
+ - lib/less/js/test/less/ie-filters.less
152
168
  - lib/less/js/test/less/import.less
153
169
  - lib/less/js/test/less/import/import-test-a.less
154
170
  - lib/less/js/test/less/import/import-test-b.less
@@ -170,41 +186,34 @@ files:
170
186
  - lib/less/js/test/less/strings.less
171
187
  - lib/less/js/test/less/variables.less
172
188
  - lib/less/js/test/less/whitespace.less
173
- has_rdoc: true
174
189
  homepage: http://lesscss.org
175
190
  licenses: []
176
-
177
191
  post_install_message:
178
192
  rdoc_options: []
179
-
180
- require_paths:
193
+ require_paths:
181
194
  - lib
182
- required_ruby_version: !ruby/object:Gem::Requirement
195
+ required_ruby_version: !ruby/object:Gem::Requirement
183
196
  none: false
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- hash: -4170628397031877353
188
- segments:
197
+ requirements:
198
+ - - ! '>='
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
201
+ segments:
189
202
  - 0
190
- version: "0"
191
- required_rubygems_version: !ruby/object:Gem::Requirement
203
+ hash: -2273088442723339156
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
205
  none: false
193
- requirements:
194
- - - ">="
195
- - !ruby/object:Gem::Version
196
- hash: -4170628397031877353
197
- segments:
198
- - 0
199
- version: "0"
206
+ requirements:
207
+ - - ! '>'
208
+ - !ruby/object:Gem::Version
209
+ version: 1.3.1
200
210
  requirements: []
201
-
202
211
  rubyforge_project: less
203
- rubygems_version: 1.6.2
212
+ rubygems_version: 1.8.10
204
213
  signing_key:
205
214
  specification_version: 3
206
215
  summary: Leaner CSS, in your browser or Ruby (via less.js)
207
- test_files:
216
+ test_files:
208
217
  - spec/less/one/one.less
209
218
  - spec/less/parser_spec.rb
210
219
  - spec/less/two/two.less