autoprefixer-rails 0.6.20130729 → 0.6.20130730

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -18,6 +18,10 @@
18
18
  * Add Opera 16 data.
19
19
  * Fix “Invalid range in character class” error on JRuby.
20
20
 
21
+ 20130730:
22
+ * Fix correct clone comments inside keyframes (by Alexey Plutalov).
23
+ * Fix angle recalculation in gradients (by Roman Komarov).
24
+
21
25
  == 0.5 (Ours is the Fury)
22
26
  * Rewrite Autoprefixer to be more flexible.
23
27
  * Use css, instead of Rework, to fix CSS parsing errors faster.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- autoprefixer-rails (0.6.20130729)
4
+ autoprefixer-rails (0.6.20130730)
5
5
  execjs
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  module AutoprefixerRails
2
- VERSION = '0.6.20130729'.freeze unless defined? AutoprefixerRails::VERSION
2
+ VERSION = '0.6.20130730'.freeze unless defined? AutoprefixerRails::VERSION
3
3
  end
@@ -1853,7 +1853,11 @@ require.register("autoprefixer/lib/autoprefixer/css.js", function(exports, requi
1853
1853
  _ref1 = i.keyframes;
1854
1854
  for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1855
1855
  keyframe = _ref1[_j];
1856
- rule = new Rule(keyframe.declarations, i.vendor);
1856
+ if (keyframe.type === 'keyframe') {
1857
+ rule = new Rule(keyframe.declarations, i.vendor);
1858
+ } else {
1859
+ rule = new Rule();
1860
+ }
1857
1861
  rule.each(callback);
1858
1862
  }
1859
1863
  }
@@ -2730,7 +2734,7 @@ require.register("autoprefixer/lib/autoprefixer/hacks/gradient.js", function(exp
2730
2734
  if (params.length > 0) {
2731
2735
  if (params[0].slice(0, 3) === 'to ') {
2732
2736
  params[0] = _this.fixDirection(params[0]);
2733
- } else if (prefix === '-webkit-' && params[0].indexOf('deg') !== -1) {
2737
+ } else if (params[0].indexOf('deg') !== -1) {
2734
2738
  params[0] = _this.fixAngle(params[0]);
2735
2739
  }
2736
2740
  }
@@ -2761,12 +2765,14 @@ require.register("autoprefixer/lib/autoprefixer/hacks/gradient.js", function(exp
2761
2765
  return param.join(' ');
2762
2766
  };
2763
2767
 
2768
+ Gradient.prototype.roundFloat = function(float, digits) {
2769
+ return parseFloat(float.toFixed(digits));
2770
+ };
2771
+
2764
2772
  Gradient.prototype.fixAngle = function(param) {
2765
- param = parseInt(param);
2766
- param += 90;
2767
- if (param > 360) {
2768
- param -= 360;
2769
- }
2773
+ param = parseFloat(param);
2774
+ param = Math.abs(450 - param) % 360;
2775
+ param = this.roundFloat(param, 3);
2770
2776
  return "" + param + "deg";
2771
2777
  };
2772
2778
 
@@ -2995,12 +3001,16 @@ require.register("autoprefixer/lib/autoprefixer/keyframes.js", function(exports,
2995
3001
  Keyframes.prototype.clone = function() {
2996
3002
  return utils.clone(this.rule, {
2997
3003
  keyframes: this.rule.keyframes.map(function(i) {
2998
- return utils.clone(i, {
2999
- values: i.values.slice(),
3000
- declarations: i.declarations.map(function(decl) {
3001
- return utils.clone(decl);
3002
- })
3003
- });
3004
+ if (i.type === 'keyframe') {
3005
+ return utils.clone(i, {
3006
+ values: i.values.slice(),
3007
+ declarations: i.declarations.map(function(decl) {
3008
+ return utils.clone(decl);
3009
+ })
3010
+ });
3011
+ } else {
3012
+ return utils.clone(i);
3013
+ }
3004
3014
  })
3005
3015
  });
3006
3016
  };
@@ -3349,7 +3359,7 @@ require.register("autoprefixer/lib/autoprefixer/rule.js", function(exports, requ
3349
3359
 
3350
3360
  Rule = (function() {
3351
3361
  function Rule(declarations, prefix) {
3352
- this.declarations = declarations;
3362
+ this.declarations = declarations != null ? declarations : [];
3353
3363
  this.prefix = prefix;
3354
3364
  }
3355
3365
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoprefixer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.20130729
4
+ version: 0.6.20130730
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-29 00:00:00.000000000 Z
12
+ date: 2013-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: execjs
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: -3263006284045042451
87
+ hash: -4258714586965380786
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: -3263006284045042451
96
+ hash: -4258714586965380786
97
97
  requirements: []
98
98
  rubyforge_project:
99
99
  rubygems_version: 1.8.23