autoprefixer 1.1.20140523 → 1.3.1
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.
- package/ChangeLog.md +17 -0
- package/README.md +15 -19
- package/data/browsers.js +62 -45
- package/data/prefixes.js +244 -315
- package/lib/binary.js +0 -32
- package/lib/caniuse.js +67 -0
- package/lib/hacks/background-size.js +30 -0
- package/lib/hacks/gradient.js +10 -12
- package/lib/prefixes.js +2 -0
- package/package.json +8 -7
- package/lib/updater.js +0 -234
- package/updaters/browsers.js +0 -69
- package/updaters/prefixes.js +0 -273
package/ChangeLog.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.3.1
|
|
2
|
+
* Fix gradient hack, when `background` property contains color.
|
|
3
|
+
|
|
4
|
+
## 1.3 “Tenka Fubu”
|
|
5
|
+
* Add `text-size-adjust` support.
|
|
6
|
+
* Add `background-size` to support Android 2.
|
|
7
|
+
|
|
8
|
+
## 1.2 “Meiji”
|
|
9
|
+
* Use Can I Use data from official `caniuse-db` npm package.
|
|
10
|
+
* Remove package data update from binary.
|
|
11
|
+
* Use increment value instead of current date in minor versions.
|
|
12
|
+
|
|
1
13
|
## 1.1 “Nutrisco et extingo”
|
|
2
14
|
* Add source map annotation comment support.
|
|
3
15
|
* Add inline source map support.
|
|
@@ -70,6 +82,11 @@
|
|
|
70
82
|
* Opera 21 is moved to released versions.
|
|
71
83
|
* Add Opera 23 data.
|
|
72
84
|
|
|
85
|
+
### 20140605
|
|
86
|
+
* Allow to parse gradients without space between color and position.
|
|
87
|
+
* Add iOS 8, Safari 8 and Android 4.4.3 data.
|
|
88
|
+
* Update browsers usage statistics.
|
|
89
|
+
|
|
73
90
|
## 1.0 “Plus ultra”
|
|
74
91
|
* Source map support.
|
|
75
92
|
* Save origin indents and code formatting.
|
package/README.md
CHANGED
|
@@ -89,9 +89,10 @@ a {
|
|
|
89
89
|
}
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
Note, that Autoprefixer doesn’t load Can I Use data every time.
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
Note, that Autoprefixer doesn’t load Can I Use data every time. It takes it from
|
|
93
|
+
[caniuse-db](https://www.npmjs.org/package/caniuse-db) dependency.
|
|
94
|
+
So, if you use Autoprefixer from `npm`, try to keep your `autoprefixer`
|
|
95
|
+
and `caniuse-db` packages fresh to have only actual prefixes in your CSS.
|
|
95
96
|
|
|
96
97
|
### Flexbox, Gradients, etc.
|
|
97
98
|
|
|
@@ -360,6 +361,12 @@ gulp.src('./css/*.css')
|
|
|
360
361
|
.pipe(gulp.dest('./dist/'));
|
|
361
362
|
```
|
|
362
363
|
|
|
364
|
+
### Brunch
|
|
365
|
+
|
|
366
|
+
You can use the
|
|
367
|
+
[autoprefixer-brunch](https://github.com/lydell/autoprefixer-brunch)
|
|
368
|
+
plugin for [Brunch](http://brunch.io/).
|
|
369
|
+
|
|
363
370
|
### Compass
|
|
364
371
|
|
|
365
372
|
If you use Compass binary to compile your styles, you can easily integrate
|
|
@@ -491,6 +498,11 @@ $css = 'a { transition: transform 1s }';
|
|
|
491
498
|
$prefixed = $autoprefixer->compile($css);
|
|
492
499
|
```
|
|
493
500
|
|
|
501
|
+
### .NET
|
|
502
|
+
|
|
503
|
+
You can use Autoprefixer from .NET and BundleTransformer with the
|
|
504
|
+
[Autoprefixer](https://github.com/digitalcreations/autoprefixer) NuGet package.
|
|
505
|
+
|
|
494
506
|
### JavaScript
|
|
495
507
|
|
|
496
508
|
You can use Autoprefixer in the browser or as a non-Node.js runtime
|
|
@@ -526,7 +538,6 @@ You can process your styles directly in Atom with the
|
|
|
526
538
|
[atom-autoprefixer](https://github.com/sindresorhus/atom-autoprefixer)
|
|
527
539
|
package.
|
|
528
540
|
|
|
529
|
-
|
|
530
541
|
### Others
|
|
531
542
|
|
|
532
543
|
You can use the `autoprefixer` binary to process CSS files using
|
|
@@ -538,18 +549,3 @@ autoprefixer *.css
|
|
|
538
549
|
```
|
|
539
550
|
|
|
540
551
|
See `autoprefixer -h` for help.
|
|
541
|
-
|
|
542
|
-
## In-package Update
|
|
543
|
-
|
|
544
|
-
It’s highly recommended that you always use the latest version of Autoprefixer.
|
|
545
|
-
If by any chance you or your company are not able to update the package
|
|
546
|
-
(e.g. in case of long test periods before any library updates), you can still
|
|
547
|
-
update the very browser data that Autoprefixer fetches from Can I Use:
|
|
548
|
-
|
|
549
|
-
```
|
|
550
|
-
autoprefixer --update
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
Note that the in-package update doesn’t get any code fixes nor the
|
|
554
|
-
implementation of new features. It just keeps the browser popularity and
|
|
555
|
-
support data up to date, and adds new browser versions.
|
package/data/browsers.js
CHANGED
|
@@ -1,50 +1,67 @@
|
|
|
1
1
|
(function() {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
prefix: "-webkit-",
|
|
34
|
-
versions: [7, 6.1, 6, 5.1, 5, 4.3, 4.2, 4.1, 4, 3.2],
|
|
35
|
-
popularity: [4.58455, 0.3607695, 0.3607695, 0.113781, 0.113781, 0.0111006, 0.0111006, 0.0055503, 0.0055503, 0]
|
|
36
|
-
},
|
|
37
|
-
opera: {
|
|
38
|
-
prefix: "-o-",
|
|
39
|
-
future: [23, 22],
|
|
40
|
-
versions: [21, 20, 19, 18, 17, 16, 15, 12.1, 12, 11.6, 11.5, 11.1, 11, 10.6, 10.5, 10.1, 10, 9.6, 9.5],
|
|
41
|
-
popularity: [0.014996, 0.464876, 0.03749, 0.029992, 0.014996, 0.007498, 0.007498, 0.367402, 0.029992, 0.014996, 0.007498, 0.008219, 0.014996, 0.014996, 0.008392, 0.003749, 0.003749, 0.003749, 0.003749]
|
|
42
|
-
},
|
|
43
|
-
safari: {
|
|
44
|
-
prefix: "-webkit-",
|
|
45
|
-
versions: [7, 6.1, 6, 5.1, 5, 4, 3.2, 3.1],
|
|
46
|
-
popularity: [1.57458, 0.67482, 0.41239, 0.794788, 0.232438, 0.11247, 0.008692, 0]
|
|
2
|
+
var agents, caniuse, code, convert, internal, intervals, minor, normalize, _ref;
|
|
3
|
+
|
|
4
|
+
caniuse = require('../lib/caniuse');
|
|
5
|
+
|
|
6
|
+
agents = require('caniuse-db/data').agents;
|
|
7
|
+
|
|
8
|
+
minor = ['bb', 'android'];
|
|
9
|
+
|
|
10
|
+
normalize = function(array) {
|
|
11
|
+
return array.reverse().filter(function(i) {
|
|
12
|
+
return i;
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
intervals = function(array) {
|
|
17
|
+
var i, interval, result, splited, sub, _i, _len;
|
|
18
|
+
result = [];
|
|
19
|
+
for (_i = 0, _len = array.length; _i < _len; _i++) {
|
|
20
|
+
interval = array[_i];
|
|
21
|
+
splited = interval.split('-');
|
|
22
|
+
splited = splited.sort().reverse();
|
|
23
|
+
sub = (function() {
|
|
24
|
+
var _j, _len1, _results;
|
|
25
|
+
_results = [];
|
|
26
|
+
for (_j = 0, _len1 = splited.length; _j < _len1; _j++) {
|
|
27
|
+
i = splited[_j];
|
|
28
|
+
_results.push([i, interval, splited.length]);
|
|
29
|
+
}
|
|
30
|
+
return _results;
|
|
31
|
+
})();
|
|
32
|
+
result = result.concat(sub);
|
|
47
33
|
}
|
|
34
|
+
return result;
|
|
48
35
|
};
|
|
49
36
|
|
|
37
|
+
convert = function(name) {
|
|
38
|
+
var future, info, result, versions;
|
|
39
|
+
info = agents[name];
|
|
40
|
+
future = normalize(info.versions.slice(-3));
|
|
41
|
+
versions = intervals(normalize(info.versions.slice(0, -3)));
|
|
42
|
+
result = {};
|
|
43
|
+
result.prefix = name === 'opera' ? '-o-' : "-" + info.prefix + "-";
|
|
44
|
+
if (minor.indexOf(name) !== -1) {
|
|
45
|
+
result.minor = true;
|
|
46
|
+
}
|
|
47
|
+
if (future.length) {
|
|
48
|
+
result.future = future;
|
|
49
|
+
}
|
|
50
|
+
result.versions = versions.map(function(i) {
|
|
51
|
+
return i[0];
|
|
52
|
+
});
|
|
53
|
+
result.popularity = versions.map(function(i) {
|
|
54
|
+
return info.usage_global[i[1]] / i[2];
|
|
55
|
+
});
|
|
56
|
+
return result;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
module.exports = {};
|
|
60
|
+
|
|
61
|
+
_ref = caniuse.browsers;
|
|
62
|
+
for (code in _ref) {
|
|
63
|
+
internal = _ref[code];
|
|
64
|
+
module.exports[internal] = convert(code);
|
|
65
|
+
}
|
|
66
|
+
|
|
50
67
|
}).call(this);
|