autoprefixer-rails 0.4.20130507 → 0.4.20130515
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/Gemfile.lock +4 -5
- data/lib/autoprefixer-rails/version.rb +1 -1
- data/vendor/autoprefixer.js +260 -146
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
* Add border-radius and box-shadow properties to database.
|
4
4
|
* Change degrees in webkit gradients.
|
5
5
|
|
6
|
+
20130515:
|
7
|
+
* Add old syntax in gradient direction.
|
8
|
+
* Add old syntax for display: flex.
|
9
|
+
* Update browser global usage statistics.
|
10
|
+
|
6
11
|
== 0.3 (Growing Strong)
|
7
12
|
* Use own filters instead of Rework’s `prefix` and `prefixValue`.
|
8
13
|
* Smarter value prefixer without false match “order” in “border”.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
autoprefixer-rails (0.4.
|
4
|
+
autoprefixer-rails (0.4.20130515)
|
5
5
|
execjs
|
6
6
|
|
7
7
|
GEM
|
@@ -43,10 +43,9 @@ GEM
|
|
43
43
|
hike (1.2.2)
|
44
44
|
i18n (0.6.1)
|
45
45
|
journey (1.0.4)
|
46
|
-
json (1.
|
46
|
+
json (1.8.0)
|
47
47
|
libv8 (3.11.8.17)
|
48
|
-
mail (2.5.
|
49
|
-
i18n (>= 0.4.0)
|
48
|
+
mail (2.5.4)
|
50
49
|
mime-types (~> 1.16)
|
51
50
|
treetop (~> 1.4.8)
|
52
51
|
mime-types (1.23)
|
@@ -98,7 +97,7 @@ GEM
|
|
98
97
|
libv8 (~> 3.11.8.12)
|
99
98
|
ref
|
100
99
|
thor (0.18.1)
|
101
|
-
tilt (1.4.
|
100
|
+
tilt (1.4.1)
|
102
101
|
treetop (1.4.12)
|
103
102
|
polyglot
|
104
103
|
polyglot (>= 0.3.1)
|
data/vendor/autoprefixer.js
CHANGED
@@ -2343,29 +2343,29 @@ module.exports = {
|
|
2343
2343
|
27
|
2344
2344
|
],
|
2345
2345
|
popularity: [
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
0.
|
2350
|
-
0.
|
2351
|
-
0.
|
2352
|
-
0.
|
2353
|
-
0.
|
2354
|
-
0.
|
2355
|
-
0.
|
2356
|
-
0.
|
2357
|
-
0.
|
2358
|
-
0.
|
2359
|
-
0.
|
2360
|
-
0.
|
2361
|
-
0.
|
2362
|
-
0.
|
2363
|
-
0.
|
2364
|
-
0.
|
2365
|
-
0.
|
2366
|
-
0.
|
2367
|
-
0.
|
2368
|
-
0.
|
2346
|
+
27.6639,
|
2347
|
+
1.61868,
|
2348
|
+
0.72324,
|
2349
|
+
0.6888,
|
2350
|
+
0.54243,
|
2351
|
+
0.5166,
|
2352
|
+
0.07749,
|
2353
|
+
0.07749,
|
2354
|
+
0.09471,
|
2355
|
+
0.09471,
|
2356
|
+
0.0861,
|
2357
|
+
0.12054,
|
2358
|
+
0.10332,
|
2359
|
+
0.11193,
|
2360
|
+
0.12054,
|
2361
|
+
0.15498,
|
2362
|
+
0.09471,
|
2363
|
+
0.03444,
|
2364
|
+
0.04305,
|
2365
|
+
0.02583,
|
2366
|
+
0.02583,
|
2367
|
+
0.02583,
|
2368
|
+
0.02583
|
2369
2369
|
]
|
2370
2370
|
},
|
2371
2371
|
ff: {
|
@@ -2398,27 +2398,27 @@ module.exports = {
|
|
2398
2398
|
21
|
2399
2399
|
],
|
2400
2400
|
popularity: [
|
2401
|
-
|
2402
|
-
|
2403
|
-
0.
|
2404
|
-
0.
|
2405
|
-
0.
|
2406
|
-
0.
|
2407
|
-
0.
|
2408
|
-
0.
|
2409
|
-
0.
|
2410
|
-
0.
|
2411
|
-
0.
|
2412
|
-
0.
|
2413
|
-
0.
|
2414
|
-
0.
|
2415
|
-
0.
|
2416
|
-
0.
|
2417
|
-
0.
|
2418
|
-
0.
|
2419
|
-
0.
|
2420
|
-
0.
|
2421
|
-
0.
|
2401
|
+
8.15367,
|
2402
|
+
4.66662,
|
2403
|
+
0.3444,
|
2404
|
+
0.30135,
|
2405
|
+
0.70602,
|
2406
|
+
0.39606,
|
2407
|
+
0.26691,
|
2408
|
+
0.20664,
|
2409
|
+
0.40467,
|
2410
|
+
0.1722,
|
2411
|
+
0.19803,
|
2412
|
+
0.10332,
|
2413
|
+
0.0861,
|
2414
|
+
0.06888,
|
2415
|
+
0.06888,
|
2416
|
+
0.07749,
|
2417
|
+
0.12054,
|
2418
|
+
0.37884,
|
2419
|
+
0.06027,
|
2420
|
+
0.09471,
|
2421
|
+
0.02583
|
2422
2422
|
]
|
2423
2423
|
},
|
2424
2424
|
ie: {
|
@@ -2431,12 +2431,15 @@ module.exports = {
|
|
2431
2431
|
6,
|
2432
2432
|
5.5
|
2433
2433
|
],
|
2434
|
+
future: [
|
2435
|
+
11
|
2436
|
+
],
|
2434
2437
|
popularity: [
|
2435
|
-
|
2436
|
-
|
2437
|
-
8.
|
2438
|
-
0.
|
2439
|
-
0.
|
2438
|
+
5.38881,
|
2439
|
+
11.6221,
|
2440
|
+
8.09627,
|
2441
|
+
0.513634,
|
2442
|
+
0.226347,
|
2440
2443
|
0.009298
|
2441
2444
|
]
|
2442
2445
|
},
|
@@ -2453,14 +2456,14 @@ module.exports = {
|
|
2453
2456
|
3.2
|
2454
2457
|
],
|
2455
2458
|
popularity: [
|
2456
|
-
6.
|
2457
|
-
0.
|
2458
|
-
0.
|
2459
|
-
0.
|
2460
|
-
0.
|
2461
|
-
0.
|
2462
|
-
0.
|
2463
|
-
0.
|
2459
|
+
6.02384,
|
2460
|
+
0.3597855,
|
2461
|
+
0.3597855,
|
2462
|
+
0.065104,
|
2463
|
+
0.065104,
|
2464
|
+
0.00685305,
|
2465
|
+
0.00685305,
|
2466
|
+
0.00685306
|
2464
2467
|
]
|
2465
2468
|
},
|
2466
2469
|
opera: {
|
@@ -2480,18 +2483,18 @@ module.exports = {
|
|
2480
2483
|
9.6
|
2481
2484
|
],
|
2482
2485
|
popularity: [
|
2483
|
-
0.
|
2484
|
-
0.
|
2485
|
-
0.
|
2486
|
-
0.
|
2487
|
-
0.
|
2488
|
-
0.
|
2489
|
-
0.
|
2486
|
+
0.62853,
|
2487
|
+
0.07749,
|
2488
|
+
0.04305,
|
2489
|
+
0.01722,
|
2490
|
+
0.00861,
|
2491
|
+
0.00861,
|
2492
|
+
0.00861,
|
2490
2493
|
0.008565,
|
2491
|
-
0.
|
2492
|
-
0.
|
2493
|
-
0.
|
2494
|
-
0.
|
2494
|
+
0.00861,
|
2495
|
+
0.00861,
|
2496
|
+
0.004305,
|
2497
|
+
0.004305
|
2495
2498
|
]
|
2496
2499
|
},
|
2497
2500
|
safari: {
|
@@ -2505,10 +2508,10 @@ module.exports = {
|
|
2505
2508
|
3.1
|
2506
2509
|
],
|
2507
2510
|
popularity: [
|
2508
|
-
1.
|
2509
|
-
1.
|
2510
|
-
0.
|
2511
|
-
0.
|
2511
|
+
1.90281,
|
2512
|
+
1.35177,
|
2513
|
+
0.4305,
|
2514
|
+
0.12054,
|
2512
2515
|
0.008692,
|
2513
2516
|
0
|
2514
2517
|
]
|
@@ -2616,7 +2619,17 @@ module.exports = {
|
|
2616
2619
|
"ios 4.3",
|
2617
2620
|
"ios 5.0",
|
2618
2621
|
"ios 5.1"
|
2619
|
-
]
|
2622
|
+
],
|
2623
|
+
replace: function (string, prefix, rules) {
|
2624
|
+
if (prefix === '-webkit-') {
|
2625
|
+
rules.add('display', '-webkit-box');
|
2626
|
+
return '-webkit-' + string;
|
2627
|
+
} else if (prefix === '-moz-') {
|
2628
|
+
return prefix + 'box';
|
2629
|
+
} else if (prefix === '-ms-') {
|
2630
|
+
return prefix + 'flexbox';
|
2631
|
+
}
|
2632
|
+
}
|
2620
2633
|
},
|
2621
2634
|
"inline-flex": {
|
2622
2635
|
props: [
|
@@ -2747,10 +2760,30 @@ module.exports = {
|
|
2747
2760
|
],
|
2748
2761
|
replace: function (string, prefix) {
|
2749
2762
|
var regexp;
|
2763
|
+
regexp = /to\s+(top|bottom)?\s*(left|right)?/ig;
|
2764
|
+
string = string.replace(regexp, function (_, ver, hor) {
|
2765
|
+
var direct;
|
2766
|
+
direct = [];
|
2767
|
+
if (ver === 'top') {
|
2768
|
+
direct.push('bottom');
|
2769
|
+
}
|
2770
|
+
if (ver === 'bottom') {
|
2771
|
+
direct.push('top');
|
2772
|
+
}
|
2773
|
+
if (hor === 'right') {
|
2774
|
+
direct.push('left');
|
2775
|
+
}
|
2776
|
+
if (hor === 'left') {
|
2777
|
+
direct.push('right');
|
2778
|
+
}
|
2779
|
+
return direct.join(' ');
|
2780
|
+
});
|
2781
|
+
regexp = /(repeating-)?(linear|radial)-gradient/gi;
|
2782
|
+
string = string.replace(regexp, prefix + '$&');
|
2750
2783
|
if (prefix !== '-webkit-') {
|
2751
|
-
return;
|
2784
|
+
return string;
|
2752
2785
|
}
|
2753
|
-
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/
|
2786
|
+
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/ig;
|
2754
2787
|
return string.replace(regexp, function (_0, gradient, _1, _2, deg) {
|
2755
2788
|
if (deg) {
|
2756
2789
|
deg = parseInt(deg);
|
@@ -2758,9 +2791,9 @@ module.exports = {
|
|
2758
2791
|
if (deg > 360) {
|
2759
2792
|
deg -= 360;
|
2760
2793
|
}
|
2761
|
-
return
|
2794
|
+
return gradient + deg + 'deg';
|
2762
2795
|
} else {
|
2763
|
-
return
|
2796
|
+
return gradient;
|
2764
2797
|
}
|
2765
2798
|
});
|
2766
2799
|
}
|
@@ -2825,10 +2858,30 @@ module.exports = {
|
|
2825
2858
|
],
|
2826
2859
|
replace: function (string, prefix) {
|
2827
2860
|
var regexp;
|
2861
|
+
regexp = /to\s+(top|bottom)?\s*(left|right)?/ig;
|
2862
|
+
string = string.replace(regexp, function (_, ver, hor) {
|
2863
|
+
var direct;
|
2864
|
+
direct = [];
|
2865
|
+
if (ver === 'top') {
|
2866
|
+
direct.push('bottom');
|
2867
|
+
}
|
2868
|
+
if (ver === 'bottom') {
|
2869
|
+
direct.push('top');
|
2870
|
+
}
|
2871
|
+
if (hor === 'right') {
|
2872
|
+
direct.push('left');
|
2873
|
+
}
|
2874
|
+
if (hor === 'left') {
|
2875
|
+
direct.push('right');
|
2876
|
+
}
|
2877
|
+
return direct.join(' ');
|
2878
|
+
});
|
2879
|
+
regexp = /(repeating-)?(linear|radial)-gradient/gi;
|
2880
|
+
string = string.replace(regexp, prefix + '$&');
|
2828
2881
|
if (prefix !== '-webkit-') {
|
2829
|
-
return;
|
2882
|
+
return string;
|
2830
2883
|
}
|
2831
|
-
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/
|
2884
|
+
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/ig;
|
2832
2885
|
return string.replace(regexp, function (_0, gradient, _1, _2, deg) {
|
2833
2886
|
if (deg) {
|
2834
2887
|
deg = parseInt(deg);
|
@@ -2836,9 +2889,9 @@ module.exports = {
|
|
2836
2889
|
if (deg > 360) {
|
2837
2890
|
deg -= 360;
|
2838
2891
|
}
|
2839
|
-
return
|
2892
|
+
return gradient + deg + 'deg';
|
2840
2893
|
} else {
|
2841
|
-
return
|
2894
|
+
return gradient;
|
2842
2895
|
}
|
2843
2896
|
});
|
2844
2897
|
}
|
@@ -2903,10 +2956,30 @@ module.exports = {
|
|
2903
2956
|
],
|
2904
2957
|
replace: function (string, prefix) {
|
2905
2958
|
var regexp;
|
2959
|
+
regexp = /to\s+(top|bottom)?\s*(left|right)?/ig;
|
2960
|
+
string = string.replace(regexp, function (_, ver, hor) {
|
2961
|
+
var direct;
|
2962
|
+
direct = [];
|
2963
|
+
if (ver === 'top') {
|
2964
|
+
direct.push('bottom');
|
2965
|
+
}
|
2966
|
+
if (ver === 'bottom') {
|
2967
|
+
direct.push('top');
|
2968
|
+
}
|
2969
|
+
if (hor === 'right') {
|
2970
|
+
direct.push('left');
|
2971
|
+
}
|
2972
|
+
if (hor === 'left') {
|
2973
|
+
direct.push('right');
|
2974
|
+
}
|
2975
|
+
return direct.join(' ');
|
2976
|
+
});
|
2977
|
+
regexp = /(repeating-)?(linear|radial)-gradient/gi;
|
2978
|
+
string = string.replace(regexp, prefix + '$&');
|
2906
2979
|
if (prefix !== '-webkit-') {
|
2907
|
-
return;
|
2980
|
+
return string;
|
2908
2981
|
}
|
2909
|
-
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/
|
2982
|
+
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/ig;
|
2910
2983
|
return string.replace(regexp, function (_0, gradient, _1, _2, deg) {
|
2911
2984
|
if (deg) {
|
2912
2985
|
deg = parseInt(deg);
|
@@ -2914,9 +2987,9 @@ module.exports = {
|
|
2914
2987
|
if (deg > 360) {
|
2915
2988
|
deg -= 360;
|
2916
2989
|
}
|
2917
|
-
return
|
2990
|
+
return gradient + deg + 'deg';
|
2918
2991
|
} else {
|
2919
|
-
return
|
2992
|
+
return gradient;
|
2920
2993
|
}
|
2921
2994
|
});
|
2922
2995
|
}
|
@@ -2981,10 +3054,30 @@ module.exports = {
|
|
2981
3054
|
],
|
2982
3055
|
replace: function (string, prefix) {
|
2983
3056
|
var regexp;
|
3057
|
+
regexp = /to\s+(top|bottom)?\s*(left|right)?/ig;
|
3058
|
+
string = string.replace(regexp, function (_, ver, hor) {
|
3059
|
+
var direct;
|
3060
|
+
direct = [];
|
3061
|
+
if (ver === 'top') {
|
3062
|
+
direct.push('bottom');
|
3063
|
+
}
|
3064
|
+
if (ver === 'bottom') {
|
3065
|
+
direct.push('top');
|
3066
|
+
}
|
3067
|
+
if (hor === 'right') {
|
3068
|
+
direct.push('left');
|
3069
|
+
}
|
3070
|
+
if (hor === 'left') {
|
3071
|
+
direct.push('right');
|
3072
|
+
}
|
3073
|
+
return direct.join(' ');
|
3074
|
+
});
|
3075
|
+
regexp = /(repeating-)?(linear|radial)-gradient/gi;
|
3076
|
+
string = string.replace(regexp, prefix + '$&');
|
2984
3077
|
if (prefix !== '-webkit-') {
|
2985
|
-
return;
|
3078
|
+
return string;
|
2986
3079
|
}
|
2987
|
-
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/
|
3080
|
+
regexp = /((repeating-)?(linear|radial)-gradient\()\s*(-?\d+deg)?/ig;
|
2988
3081
|
return string.replace(regexp, function (_0, gradient, _1, _2, deg) {
|
2989
3082
|
if (deg) {
|
2990
3083
|
deg = parseInt(deg);
|
@@ -2992,9 +3085,9 @@ module.exports = {
|
|
2992
3085
|
if (deg > 360) {
|
2993
3086
|
deg -= 360;
|
2994
3087
|
}
|
2995
|
-
return
|
3088
|
+
return gradient + deg + 'deg';
|
2996
3089
|
} else {
|
2997
|
-
return
|
3090
|
+
return gradient;
|
2998
3091
|
}
|
2999
3092
|
});
|
3000
3093
|
}
|
@@ -6073,6 +6166,7 @@ module.exports = {
|
|
6073
6166
|
"user-select": {
|
6074
6167
|
browsers: [
|
6075
6168
|
"ie 10",
|
6169
|
+
"ie 11",
|
6076
6170
|
"ff 2",
|
6077
6171
|
"ff 3",
|
6078
6172
|
"ff 4",
|
@@ -6278,6 +6372,41 @@ var error = function (message) {
|
|
6278
6372
|
throw err;
|
6279
6373
|
};
|
6280
6374
|
|
6375
|
+
// Class to edit rules array inside forEach.
|
6376
|
+
var Rules = function(rules) {
|
6377
|
+
this.rules = rules;
|
6378
|
+
};
|
6379
|
+
Rules.prototype = {
|
6380
|
+
// Execute `callback` on every rule.
|
6381
|
+
forEach: function (callback) {
|
6382
|
+
for ( this.num = 0; this.num < this.rules.length; this.num += 1 ) {
|
6383
|
+
callback(this.rules[this.num]);
|
6384
|
+
}
|
6385
|
+
},
|
6386
|
+
|
6387
|
+
// Check that rules contain rule with `prop` and `values`.
|
6388
|
+
contain: function (prop, value) {
|
6389
|
+
return this.rules.some(function (rule) {
|
6390
|
+
return rule.property === prop && rule.value === value;
|
6391
|
+
});
|
6392
|
+
},
|
6393
|
+
|
6394
|
+
// Add new rule with `prop` and `value`.
|
6395
|
+
add: function (prop, value) {
|
6396
|
+
if ( this.contain(prop, value) ) {
|
6397
|
+
return;
|
6398
|
+
}
|
6399
|
+
|
6400
|
+
this.rules.splice(this.num, 0, { property: prop, value: value });
|
6401
|
+
this.num += 1;
|
6402
|
+
},
|
6403
|
+
|
6404
|
+
// Remove current rule.
|
6405
|
+
removeCurrent: function () {
|
6406
|
+
this.rules.splice(this.num, 1);
|
6407
|
+
}
|
6408
|
+
};
|
6409
|
+
|
6281
6410
|
// Parse CSS and add prefixed properties and values by Can I Use database
|
6282
6411
|
// for actual browsers.
|
6283
6412
|
//
|
@@ -6339,8 +6468,19 @@ var autoprefixer = {
|
|
6339
6468
|
|
6340
6469
|
// Change `style` declarations in parsed CSS, to add prefixes for `props`.
|
6341
6470
|
prefixer: function (props, style) {
|
6471
|
+
var all = props['*'];
|
6472
|
+
var prefixes = ['-webkit-', '-moz-', '-ms-', '-o-'];
|
6473
|
+
|
6474
|
+
var transitions = { };
|
6475
|
+
for ( var i in props ) {
|
6476
|
+
if ( props[i].transition && props[i].prefixes ) {
|
6477
|
+
transitions[i] = props[i];
|
6478
|
+
}
|
6479
|
+
}
|
6480
|
+
var isTransition = /(-(webkit|moz|ms|o)-)?transition(-property)?/;
|
6481
|
+
|
6482
|
+
// Keyframes
|
6342
6483
|
if ( props['@keyframes'] ) {
|
6343
|
-
// Keyframes
|
6344
6484
|
style.rules.forEach(function(rule) {
|
6345
6485
|
if ( !rule.keyframes ) {
|
6346
6486
|
return;
|
@@ -6376,48 +6516,22 @@ var autoprefixer = {
|
|
6376
6516
|
});
|
6377
6517
|
}
|
6378
6518
|
|
6379
|
-
|
6380
|
-
|
6381
|
-
for ( var i in props ) {
|
6382
|
-
if ( props[i].transition && props[i].prefixes ) {
|
6383
|
-
transitions[i] = props[i];
|
6384
|
-
}
|
6385
|
-
}
|
6386
|
-
var isTransition = /(-(webkit|moz|ms|o)-)?transition(-property)?/;
|
6387
|
-
|
6388
|
-
rework.visit.declarations(style, function (rules, node) {
|
6389
|
-
var vendor = node.vendor;
|
6390
|
-
var prefixes = ['-webkit-', '-moz-', '-ms-', '-o-'];
|
6391
|
-
|
6392
|
-
var contain = function (rules, prop, value) {
|
6393
|
-
return rules.some(function (rule) {
|
6394
|
-
return rule.property === prop && rule.value === value;
|
6395
|
-
});
|
6396
|
-
};
|
6397
|
-
var add = function (rules, num, prop, value) {
|
6398
|
-
if ( contain(rules, prop, value) ) {
|
6399
|
-
return num;
|
6400
|
-
}
|
6401
|
-
|
6402
|
-
rules.splice(num, 0, { property: prop, value: value });
|
6403
|
-
return num + 1;
|
6404
|
-
};
|
6405
|
-
var num, rule, prop;
|
6519
|
+
rework.visit.declarations(style, function (list, node) {
|
6520
|
+
var rules = new Rules(list);
|
6406
6521
|
|
6407
6522
|
// Properties
|
6408
|
-
|
6409
|
-
|
6410
|
-
prop = props[rule.property];
|
6523
|
+
rules.forEach(function (rule) {
|
6524
|
+
var prop = props[rule.property];
|
6411
6525
|
|
6412
6526
|
if ( !prop || !prop.prefixes ) {
|
6413
|
-
|
6527
|
+
return;
|
6414
6528
|
}
|
6415
6529
|
if ( prop.check && !prop.check.call(rule.value, rule) ) {
|
6416
|
-
|
6530
|
+
return;
|
6417
6531
|
}
|
6418
6532
|
|
6419
6533
|
prop.prefixes.forEach(function (prefix) {
|
6420
|
-
if ( vendor && vendor !== prefix ) {
|
6534
|
+
if ( node.vendor && node.vendor !== prefix ) {
|
6421
6535
|
return;
|
6422
6536
|
}
|
6423
6537
|
var wrong = prefixes.some(function (other) {
|
@@ -6430,17 +6544,15 @@ var autoprefixer = {
|
|
6430
6544
|
return;
|
6431
6545
|
}
|
6432
6546
|
|
6433
|
-
|
6547
|
+
rules.add(prefix + rule.property, rule.value);
|
6434
6548
|
});
|
6435
|
-
}
|
6549
|
+
});
|
6436
6550
|
|
6437
6551
|
// Values
|
6438
|
-
|
6439
|
-
|
6440
|
-
|
6441
|
-
var
|
6442
|
-
var propVendor = split.prefix || vendor;
|
6443
|
-
prop = props[split.name];
|
6552
|
+
rules.forEach(function (rule) {
|
6553
|
+
var split = splitPrefix(rule.property);
|
6554
|
+
var vendor = split.prefix || node.vendor;
|
6555
|
+
var prop = props[split.name];
|
6444
6556
|
|
6445
6557
|
var valuePrefixer = function (values) {
|
6446
6558
|
var prefixed = { };
|
@@ -6452,22 +6564,23 @@ var autoprefixer = {
|
|
6452
6564
|
}
|
6453
6565
|
|
6454
6566
|
value.prefixes.forEach(function (prefix) {
|
6455
|
-
if (
|
6567
|
+
if ( vendor && vendor !== prefix ) {
|
6456
6568
|
return;
|
6457
6569
|
}
|
6458
|
-
if ( !prefixed[prefix]) {
|
6570
|
+
if ( !prefixed[prefix] ) {
|
6459
6571
|
prefixed[prefix] = rule.value;
|
6460
6572
|
}
|
6461
6573
|
if ( value.replace ) {
|
6462
6574
|
if ( prefixed[prefix].match(value.regexp) ) {
|
6463
6575
|
var replaced = value.replace(
|
6464
|
-
prefixed[prefix], prefix);
|
6576
|
+
prefixed[prefix], prefix, rules);
|
6465
6577
|
if ( replaced ) {
|
6466
6578
|
prefixed[prefix] = replaced;
|
6467
6579
|
return;
|
6468
6580
|
}
|
6469
6581
|
}
|
6470
6582
|
}
|
6583
|
+
|
6471
6584
|
prefixed[prefix] = prefixed[prefix].replace(
|
6472
6585
|
value.regexp, '$1' + prefix + name + '$2');
|
6473
6586
|
});
|
@@ -6475,19 +6588,20 @@ var autoprefixer = {
|
|
6475
6588
|
|
6476
6589
|
|
6477
6590
|
for ( var prefix in prefixed ) {
|
6478
|
-
if ( prefixed[prefix]
|
6479
|
-
|
6480
|
-
|
6481
|
-
|
6482
|
-
|
6483
|
-
|
6484
|
-
|
6485
|
-
|
6486
|
-
|
6591
|
+
if ( prefixed[prefix] === rule.value ) {
|
6592
|
+
continue;
|
6593
|
+
}
|
6594
|
+
|
6595
|
+
if ( vendor ) {
|
6596
|
+
var exists = rules.contain(
|
6597
|
+
rule.property, prefixed[prefix]);
|
6598
|
+
if ( exists ) {
|
6599
|
+
rules.removeCurrent();
|
6487
6600
|
} else {
|
6488
|
-
|
6489
|
-
prefixed[prefix]);
|
6601
|
+
rule.value = prefixed[prefix];
|
6490
6602
|
}
|
6603
|
+
} else {
|
6604
|
+
rules.add(rule.property, prefixed[prefix]);
|
6491
6605
|
}
|
6492
6606
|
}
|
6493
6607
|
};
|
@@ -6501,7 +6615,7 @@ var autoprefixer = {
|
|
6501
6615
|
if ( rule.property.match(isTransition) ) {
|
6502
6616
|
valuePrefixer(transitions);
|
6503
6617
|
}
|
6504
|
-
}
|
6618
|
+
});
|
6505
6619
|
});
|
6506
6620
|
},
|
6507
6621
|
|
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.4.
|
4
|
+
version: 0.4.20130515
|
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-05-
|
12
|
+
date: 2013-05-15 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: -3533190871297258708
|
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: -3533190871297258708
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
97
|
rubygems_version: 1.8.23
|