autoprefixer-rails 0.5.20130616 → 0.5.20130617
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +7 -0
- data/Gemfile.lock +1 -1
- data/lib/autoprefixer-rails/version.rb +1 -1
- data/vendor/autoprefixer.js +175 -26
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -9,6 +9,13 @@
|
|
9
9
|
* Remove old WebKit gradient syntax.
|
10
10
|
* Fix parsing error on comment with braces.
|
11
11
|
|
12
|
+
20130617:
|
13
|
+
* Remove old Mozilla border-radius.
|
14
|
+
* Don’t prefix old IE filter.
|
15
|
+
* Remove old background-clip, background-size and background-origin prefixes.
|
16
|
+
* Speed up regexps in values.
|
17
|
+
* Allow to hack property declarations.
|
18
|
+
|
12
19
|
== 0.4 (Winter Is Coming)
|
13
20
|
* Remove outdated prefixes.
|
14
21
|
* Add border-radius and box-shadow properties to database.
|
data/Gemfile.lock
CHANGED
data/vendor/autoprefixer.js
CHANGED
@@ -1135,6 +1135,15 @@ require.register("autoprefixer/data/prefixes.js", function(exports, require, mod
|
|
1135
1135
|
browsers: ["ie 9", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 3.5", "ff 3.6", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "safari 4", "safari 5", "safari 6", "safari 7", "safari 3.1", "safari 3.2", "safari 5.1", "opera 11", "opera 12", "opera 15", "opera 10.5", "opera 10.6", "opera 11.1", "opera 11.5", "opera 11.6", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "android 3", "android 4", "android 2.1", "android 2.2", "android 2.3", "android 4.1", "android 4.2", "bb 7", "bb 10"],
|
1136
1136
|
transition: true
|
1137
1137
|
},
|
1138
|
+
"background-clip": {
|
1139
|
+
browsers: ["ff 3.6", "opera 10", "opera 10.1"]
|
1140
|
+
},
|
1141
|
+
"background-origin": {
|
1142
|
+
browsers: ["ff 3.6", "opera 10", "opera 10.1"]
|
1143
|
+
},
|
1144
|
+
"background-size": {
|
1145
|
+
browsers: ["ff 3.6", "opera 10", "opera 10.1"]
|
1146
|
+
},
|
1138
1147
|
"border-bottom-left-radius": {
|
1139
1148
|
browsers: ["ff 2", "ff 3", "ff 3.5", "ff 3.6", "chrome 4", "safari 4", "safari 3.1", "safari 3.2", "ios 3.2", "android 2.1"],
|
1140
1149
|
transition: true
|
@@ -1431,7 +1440,7 @@ require.register("autoprefixer/lib/autoprefixer/binary.js", function(exports, re
|
|
1431
1440
|
var h;
|
1432
1441
|
h = [];
|
1433
1442
|
h.push('Files:');
|
1434
|
-
h.push("
|
1443
|
+
h.push(" By default, prefixed CSS will rewrite original files.");
|
1435
1444
|
h.push(" If you didn't set input files, " + "autoprefixer will read from stdin stream.");
|
1436
1445
|
h.push(" Output CSS will be written to stdout stream on " + "`-o -' argument or stdin input.");
|
1437
1446
|
h.push('');
|
@@ -1831,20 +1840,46 @@ require.register("autoprefixer/lib/autoprefixer/declaration.js", function(export
|
|
1831
1840
|
utils = require('./utils');
|
1832
1841
|
|
1833
1842
|
Declaration = (function() {
|
1834
|
-
|
1835
|
-
var
|
1843
|
+
Declaration.register = function(klass) {
|
1844
|
+
var name, _i, _len, _ref, _results;
|
1845
|
+
_ref = klass.names;
|
1846
|
+
_results = [];
|
1847
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
1848
|
+
name = _ref[_i];
|
1849
|
+
_results.push(this.hacks[name] = klass);
|
1850
|
+
}
|
1851
|
+
return _results;
|
1852
|
+
};
|
1853
|
+
|
1854
|
+
Declaration.hacks = {};
|
1855
|
+
|
1856
|
+
Declaration.load = function(rule, number, node) {
|
1857
|
+
var klass, prefix, unprefixed, _ref;
|
1858
|
+
_ref = this.split(node.property), prefix = _ref[0], unprefixed = _ref[1];
|
1859
|
+
klass = this.hacks[unprefixed] || Declaration;
|
1860
|
+
return new klass(rule, number, node, prefix, unprefixed);
|
1861
|
+
};
|
1862
|
+
|
1863
|
+
Declaration.split = function(prop) {
|
1864
|
+
var prefix, separator, unprefixed;
|
1865
|
+
if (prop[0] === '-') {
|
1866
|
+
separator = prop.indexOf('-', 1) + 1;
|
1867
|
+
prefix = prop.slice(0, separator);
|
1868
|
+
unprefixed = prop.slice(separator);
|
1869
|
+
return [prefix, unprefixed];
|
1870
|
+
} else {
|
1871
|
+
return [void 0, prop];
|
1872
|
+
}
|
1873
|
+
};
|
1874
|
+
|
1875
|
+
function Declaration(rule, number, node, prefix, unprefixed) {
|
1836
1876
|
this.rule = rule;
|
1837
1877
|
this.number = number;
|
1838
1878
|
this.node = node;
|
1879
|
+
this.prefix = prefix;
|
1880
|
+
this.unprefixed = unprefixed;
|
1839
1881
|
this.prop = this.node.property;
|
1840
1882
|
this.value = this.node.value;
|
1841
|
-
if (this.prop[0] === '-') {
|
1842
|
-
separator = this.prop.indexOf('-', 1) + 1;
|
1843
|
-
this.prefix = this.prop.slice(0, separator);
|
1844
|
-
this.unprefixed = this.prop.slice(separator);
|
1845
|
-
} else {
|
1846
|
-
this.unprefixed = this.prop;
|
1847
|
-
}
|
1848
1883
|
this.valuesCache = {};
|
1849
1884
|
}
|
1850
1885
|
|
@@ -1915,6 +1950,99 @@ require.register("autoprefixer/lib/autoprefixer/declaration.js", function(export
|
|
1915
1950
|
|
1916
1951
|
}).call(this);
|
1917
1952
|
|
1953
|
+
});
|
1954
|
+
require.register("autoprefixer/lib/autoprefixer/hacks/border-radius.js", function(exports, require, module){
|
1955
|
+
(function() {
|
1956
|
+
var BorderRadius, Declaration,
|
1957
|
+
__hasProp = {}.hasOwnProperty,
|
1958
|
+
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
1959
|
+
|
1960
|
+
Declaration = require('../declaration');
|
1961
|
+
|
1962
|
+
BorderRadius = (function(_super) {
|
1963
|
+
var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1;
|
1964
|
+
|
1965
|
+
__extends(BorderRadius, _super);
|
1966
|
+
|
1967
|
+
BorderRadius.names = ['border-radius'];
|
1968
|
+
|
1969
|
+
BorderRadius.toMozilla = {};
|
1970
|
+
|
1971
|
+
BorderRadius.toNormal = {};
|
1972
|
+
|
1973
|
+
_ref = ['top', 'bottom'];
|
1974
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
1975
|
+
ver = _ref[_i];
|
1976
|
+
_ref1 = ['left', 'right'];
|
1977
|
+
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
1978
|
+
hor = _ref1[_j];
|
1979
|
+
normal = "border-" + ver + "-" + hor + "-radius";
|
1980
|
+
mozilla = "border-radius-" + ver + hor;
|
1981
|
+
BorderRadius.names.push(normal);
|
1982
|
+
BorderRadius.names.push(mozilla);
|
1983
|
+
BorderRadius.toMozilla[normal] = mozilla;
|
1984
|
+
BorderRadius.toNormal[mozilla] = normal;
|
1985
|
+
}
|
1986
|
+
}
|
1987
|
+
|
1988
|
+
function BorderRadius() {
|
1989
|
+
BorderRadius.__super__.constructor.apply(this, arguments);
|
1990
|
+
if (this.prefix === '-moz-') {
|
1991
|
+
this.unprefixed = BorderRadius.toNormal[this.unprefixed] || this.unprefixed;
|
1992
|
+
this.prop = this.prefix + this.unprefixed;
|
1993
|
+
}
|
1994
|
+
}
|
1995
|
+
|
1996
|
+
BorderRadius.prototype.prefixProp = function(prefix) {
|
1997
|
+
var prop;
|
1998
|
+
if (prefix === '-moz-') {
|
1999
|
+
prop = BorderRadius.toMozilla[this.unprefixed] || this.unprefixed;
|
2000
|
+
if (this.rule.contain(prefix + prop)) {
|
2001
|
+
return;
|
2002
|
+
}
|
2003
|
+
return this.insertBefore(prefix + prop, this.value);
|
2004
|
+
} else {
|
2005
|
+
return BorderRadius.__super__.prefixProp.apply(this, arguments);
|
2006
|
+
}
|
2007
|
+
};
|
2008
|
+
|
2009
|
+
return BorderRadius;
|
2010
|
+
|
2011
|
+
})(Declaration);
|
2012
|
+
|
2013
|
+
module.exports = BorderRadius;
|
2014
|
+
|
2015
|
+
}).call(this);
|
2016
|
+
|
2017
|
+
});
|
2018
|
+
require.register("autoprefixer/lib/autoprefixer/hacks/filter.js", function(exports, require, module){
|
2019
|
+
(function() {
|
2020
|
+
var Declaration, Filter,
|
2021
|
+
__hasProp = {}.hasOwnProperty,
|
2022
|
+
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
2023
|
+
|
2024
|
+
Declaration = require('../declaration');
|
2025
|
+
|
2026
|
+
Filter = (function(_super) {
|
2027
|
+
__extends(Filter, _super);
|
2028
|
+
|
2029
|
+
Filter.names = ['filter'];
|
2030
|
+
|
2031
|
+
function Filter() {
|
2032
|
+
Filter.__super__.constructor.apply(this, arguments);
|
2033
|
+
if (this.value.match(/DXImageTransform\.Microsoft/)) {
|
2034
|
+
this.unprefixed = this.prop = '-ms-filter';
|
2035
|
+
}
|
2036
|
+
}
|
2037
|
+
|
2038
|
+
return Filter;
|
2039
|
+
|
2040
|
+
})(Declaration);
|
2041
|
+
|
2042
|
+
module.exports = Filter;
|
2043
|
+
|
2044
|
+
}).call(this);
|
2045
|
+
|
1918
2046
|
});
|
1919
2047
|
require.register("autoprefixer/lib/autoprefixer/hacks/gradient.js", function(exports, require, module){
|
1920
2048
|
(function() {
|
@@ -1927,13 +2055,24 @@ require.register("autoprefixer/lib/autoprefixer/hacks/gradient.js", function(exp
|
|
1927
2055
|
utils = require('../utils');
|
1928
2056
|
|
1929
2057
|
Gradient = (function(_super) {
|
2058
|
+
var i, _i, _len, _ref;
|
2059
|
+
|
1930
2060
|
__extends(Gradient, _super);
|
1931
2061
|
|
2062
|
+
Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'];
|
2063
|
+
|
2064
|
+
Gradient.regexps = {};
|
2065
|
+
|
2066
|
+
_ref = Gradient.names;
|
2067
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
2068
|
+
i = _ref[_i];
|
2069
|
+
Gradient.regexps[i] = new RegExp('(^|\\s|,)' + i + '\\(([^)]+)\\)', 'gi');
|
2070
|
+
}
|
2071
|
+
|
1932
2072
|
function Gradient(name, prefixes) {
|
1933
2073
|
this.name = name;
|
1934
2074
|
this.prefixes = prefixes;
|
1935
|
-
|
1936
|
-
this.regexp = new RegExp('(^|\\s|,)' + name + '\\(([^)]+)\\)', 'gi');
|
2075
|
+
this.regexp = Gradient.regexps[this.name];
|
1937
2076
|
}
|
1938
2077
|
|
1939
2078
|
Gradient.prototype.addPrefix = function(prefix, string) {
|
@@ -1963,10 +2102,10 @@ require.register("autoprefixer/lib/autoprefixer/hacks/gradient.js", function(exp
|
|
1963
2102
|
param = param.split(' ');
|
1964
2103
|
param.splice(0, 1);
|
1965
2104
|
param = (function() {
|
1966
|
-
var
|
2105
|
+
var _j, _len1, _results;
|
1967
2106
|
_results = [];
|
1968
|
-
for (
|
1969
|
-
value = param[
|
2107
|
+
for (_j = 0, _len1 = param.length; _j < _len1; _j++) {
|
2108
|
+
value = param[_j];
|
1970
2109
|
_results.push(this.directions[value.toLowerCase()] || value);
|
1971
2110
|
}
|
1972
2111
|
return _results;
|
@@ -2152,7 +2291,7 @@ require.register("autoprefixer/lib/autoprefixer/prefixes.js", function(exports,
|
|
2152
2291
|
|
2153
2292
|
Value = require('./value');
|
2154
2293
|
|
2155
|
-
Value.register(
|
2294
|
+
Value.register(require('./hacks/gradient'));
|
2156
2295
|
|
2157
2296
|
Prefixes = (function() {
|
2158
2297
|
function Prefixes(data, browsers) {
|
@@ -2397,6 +2536,10 @@ require.register("autoprefixer/lib/autoprefixer/rule.js", function(exports, requ
|
|
2397
2536
|
|
2398
2537
|
Declaration = require('./declaration');
|
2399
2538
|
|
2539
|
+
Declaration.register(require('./hacks/filter'));
|
2540
|
+
|
2541
|
+
Declaration.register(require('./hacks/border-radius'));
|
2542
|
+
|
2400
2543
|
Rule = (function() {
|
2401
2544
|
function Rule(declarations, prefix) {
|
2402
2545
|
this.declarations = declarations;
|
@@ -2409,7 +2552,7 @@ require.register("autoprefixer/lib/autoprefixer/rule.js", function(exports, requ
|
|
2409
2552
|
_results = [];
|
2410
2553
|
while (this.number < this.declarations.length) {
|
2411
2554
|
if (this.declarations[this.number].property) {
|
2412
|
-
decl =
|
2555
|
+
decl = Declaration.load(this, this.number, this.declarations[this.number]);
|
2413
2556
|
callback(decl, decl.prefix || this.prefix);
|
2414
2557
|
}
|
2415
2558
|
_results.push(this.number += 1);
|
@@ -2440,7 +2583,7 @@ require.register("autoprefixer/lib/autoprefixer/rule.js", function(exports, requ
|
|
2440
2583
|
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
|
2441
2584
|
decl = _ref[i];
|
2442
2585
|
if (decl.property === prop) {
|
2443
|
-
return
|
2586
|
+
return Declaration.load(this, i, decl);
|
2444
2587
|
}
|
2445
2588
|
}
|
2446
2589
|
return null;
|
@@ -2517,18 +2660,17 @@ require.register("autoprefixer/lib/autoprefixer/utils.js", function(exports, req
|
|
2517
2660
|
});
|
2518
2661
|
require.register("autoprefixer/lib/autoprefixer/value.js", function(exports, require, module){
|
2519
2662
|
(function() {
|
2520
|
-
var Value, utils
|
2521
|
-
__slice = [].slice;
|
2663
|
+
var Value, utils;
|
2522
2664
|
|
2523
2665
|
utils = require('./utils');
|
2524
2666
|
|
2525
2667
|
Value = (function() {
|
2526
|
-
Value.register = function() {
|
2527
|
-
var
|
2528
|
-
|
2668
|
+
Value.register = function(klass) {
|
2669
|
+
var name, _i, _len, _ref, _results;
|
2670
|
+
_ref = klass.names;
|
2529
2671
|
_results = [];
|
2530
|
-
for (
|
2531
|
-
name =
|
2672
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
2673
|
+
name = _ref[_i];
|
2532
2674
|
_results.push(this.hacks[name] = klass);
|
2533
2675
|
}
|
2534
2676
|
return _results;
|
@@ -2542,10 +2684,17 @@ require.register("autoprefixer/lib/autoprefixer/value.js", function(exports, req
|
|
2542
2684
|
return new klass(name, prefixes);
|
2543
2685
|
};
|
2544
2686
|
|
2687
|
+
Value.regexps = {};
|
2688
|
+
|
2689
|
+
Value.regexp = function(name) {
|
2690
|
+
var _base;
|
2691
|
+
return (_base = this.regexps)[name] || (_base[name] = utils.regexp(name));
|
2692
|
+
};
|
2693
|
+
|
2545
2694
|
function Value(name, prefixes) {
|
2546
2695
|
this.name = name;
|
2547
2696
|
this.prefixes = prefixes;
|
2548
|
-
this.regexp =
|
2697
|
+
this.regexp = Value.regexp(this.name);
|
2549
2698
|
}
|
2550
2699
|
|
2551
2700
|
Value.prototype.check = function(decl) {
|
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.5.
|
4
|
+
version: 0.5.20130617
|
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-06-
|
12
|
+
date: 2013-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: execjs
|
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
segments:
|
84
84
|
- 0
|
85
|
-
hash:
|
85
|
+
hash: 1818575999731197574
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
none: false
|
88
88
|
requirements:
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash:
|
94
|
+
hash: 1818575999731197574
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
97
|
rubygems_version: 1.8.23
|