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 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. This data
93
- is already packed in the release, so the same Autoprefixer version will always
94
- have same output.
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
- module.exports = {
3
- android: {
4
- prefix: "-webkit-",
5
- minor: true,
6
- versions: [4.4, 4.3, 4.2, 4.1, 4, 3, 2.3, 2.2, 2.1],
7
- popularity: [0.337062, 0.858555, 0.858555, 2.18772, 0.909432, 0.00635967, 1.13202, 0.0699563, 0.0254387]
8
- },
9
- bb: {
10
- prefix: "-webkit-",
11
- minor: true,
12
- versions: [10, 7],
13
- popularity: [0, 0.113215]
14
- },
15
- chrome: {
16
- prefix: "-webkit-",
17
- future: [38, 37, 36],
18
- versions: [35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4],
19
- popularity: [0.134964, 19.4573, 11.5844, 0.71231, 0.809784, 0.239936, 0.41239, 0.172454, 0.457378, 0.172454, 0.082478, 0.052486, 0.067482, 0.11247, 0.48737, 0.03749, 0.022494, 0.067482, 0.022494, 0.029992, 0.052486, 0.03749, 0.044988, 0.052486, 0.11247, 0.029992, 0.014996, 0.022494, 0.014996, 0.022494, 0.022494, 0.022494]
20
- },
21
- ff: {
22
- prefix: "-moz-",
23
- future: [32, 31, 30],
24
- versions: [29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3.6, 3.5, 3, 2],
25
- popularity: [0.48737, 11.382, 0.63733, 0.269928, 0.134964, 0.232438, 0.097474, 0.104972, 0.22494, 0.089976, 0.07498, 0.059984, 0.104972, 0.142462, 0.082478, 0.059984, 0.059984, 0.142462, 0.059984, 0.067482, 0.03749, 0.052486, 0.029992, 0.03749, 0.029992, 0.044988, 0.179952, 0.029992, 0.07498, 0.007498]
26
- },
27
- ie: {
28
- prefix: "-ms-",
29
- versions: [11, 10, 9, 8, 7, 6, 5.5],
30
- popularity: [7.0483, 3.02851, 2.78654, 4.76912, 0.163914, 0.288801, 0.009298]
31
- },
32
- ios: {
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);