autoprefixer 6.6.0 → 6.7.2

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,17 @@
1
+ ## 6.7.2
2
+ * Do not prefix grid/flexbox in `@supports` on `grid: false`/`flexbox: false`.
3
+
4
+ ## 6.7.1
5
+ * Update Browserslist with `last n version` fix.
6
+
7
+ ## 6.7 “Krungthep doot thep saang”
8
+ * Add Electron support in browsers list (by Kilian Valkhof).
9
+ * Add `flex-flow` partial support for Flexbox 2009 specification.
10
+ * Fix browsers `0` version issue in some Can I Use data.
11
+
12
+ ## 6.6.1
13
+ * Add metadata to use Autoprefixer in JSS tests (by Chi Vinh Le).
14
+
1
15
  ## 6.6 “Kaiyuan”
2
16
  * Add `browserslist` key in `package.json` support.
3
17
  * Add support for separated environments in browserslist config.
package/README.md CHANGED
@@ -5,8 +5,7 @@
5
5
  title="Autoprefixer logo by Anton Lovchikov">
6
6
 
7
7
  [PostCSS] plugin to parse CSS and add vendor prefixes to CSS rules using values
8
- from [Can I Use]. It is [recommended] by Google and used in Twitter,
9
- and Taobao.
8
+ from [Can I Use]. It is [recommended] by Google and used in Twitter and Taobao.
10
9
 
11
10
  Write your CSS rules without vendor prefixes (in fact, forget about them
12
11
  entirely):
@@ -526,7 +525,7 @@ There are 8 options:
526
525
  * `browsers` (array): list of browsers query (like `last 2 version`),
527
526
  which are supported in your project. We recommend to use `browserslist`
528
527
  config or `browserslist` key in `package.json`, rather than this option
529
- to share browsers with other tools.Wee [Browserslist docs] for available
528
+ to share browsers with other tools. See [Browserslist docs] for available
530
529
  queries and default value.
531
530
  * `env` (string): environment for Browserslist.
532
531
  * `cascade` (boolean): should Autoprefixer use Visual Cascade,
package/data/prefixes.js CHANGED
@@ -81,34 +81,39 @@
81
81
  feature(require('caniuse-db/features-json/border-radius.json'), function(browsers) {
82
82
  return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', {
83
83
  mistakes: ['-khtml-', '-ms-', '-o-'],
84
- browsers: browsers
84
+ browsers: browsers,
85
+ feature: 'border-radius'
85
86
  });
86
87
  });
87
88
 
88
89
  feature(require('caniuse-db/features-json/css-boxshadow.json'), function(browsers) {
89
90
  return prefix('box-shadow', {
90
91
  mistakes: ['-khtml-'],
91
- browsers: browsers
92
+ browsers: browsers,
93
+ feature: 'css-boxshadow'
92
94
  });
93
95
  });
94
96
 
95
97
  feature(require('caniuse-db/features-json/css-animation.json'), function(browsers) {
96
98
  return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', {
97
99
  mistakes: ['-khtml-', '-ms-'],
98
- browsers: browsers
100
+ browsers: browsers,
101
+ feature: 'css-animation'
99
102
  });
100
103
  });
101
104
 
102
105
  feature(require('caniuse-db/features-json/css-transitions.json'), function(browsers) {
103
106
  return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', {
104
107
  mistakes: ['-khtml-', '-ms-'],
105
- browsers: browsers
108
+ browsers: browsers,
109
+ feature: 'css-transitions'
106
110
  });
107
111
  });
108
112
 
109
113
  feature(require('caniuse-db/features-json/transforms2d.json'), function(browsers) {
110
114
  return prefix('transform', 'transform-origin', {
111
- browsers: browsers
115
+ browsers: browsers,
116
+ feature: 'transforms2d'
112
117
  });
113
118
  });
114
119
 
@@ -116,11 +121,13 @@
116
121
 
117
122
  feature(transforms3d, function(browsers) {
118
123
  prefix('perspective', 'perspective-origin', {
119
- browsers: browsers
124
+ browsers: browsers,
125
+ feature: 'transforms3d'
120
126
  });
121
127
  return prefix('transform-style', {
122
128
  mistakes: ['-ms-', '-o-'],
123
- browsers: browsers
129
+ browsers: browsers,
130
+ feature: 'transforms3d'
124
131
  });
125
132
  });
126
133
 
@@ -129,7 +136,8 @@
129
136
  }, function(browsers) {
130
137
  return prefix('backface-visibility', {
131
138
  mistakes: ['-ms-', '-o-'],
132
- browsers: browsers
139
+ browsers: browsers,
140
+ feature: 'transforms3d'
133
141
  });
134
142
  });
135
143
 
@@ -141,7 +149,8 @@
141
149
  return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
142
150
  props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
143
151
  mistakes: ['-ms-'],
144
- browsers: browsers
152
+ browsers: browsers,
153
+ feature: 'css-gradients'
145
154
  });
146
155
  });
147
156
 
@@ -156,19 +165,22 @@
156
165
  }
157
166
  });
158
167
  return add('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
159
- browsers: browsers
168
+ browsers: browsers,
169
+ feature: 'css-gradients'
160
170
  });
161
171
  });
162
172
 
163
173
  feature(require('caniuse-db/features-json/css3-boxsizing.json'), function(browsers) {
164
174
  return prefix('box-sizing', {
165
- browsers: browsers
175
+ browsers: browsers,
176
+ feature: 'css3-boxsizing'
166
177
  });
167
178
  });
168
179
 
169
180
  feature(require('caniuse-db/features-json/css-filters.json'), function(browsers) {
170
181
  return prefix('filter', {
171
- browsers: browsers
182
+ browsers: browsers,
183
+ feature: 'css-filters'
172
184
  });
173
185
  });
174
186
 
@@ -177,7 +189,8 @@
177
189
  feature(filterFunction, function(browsers) {
178
190
  return prefix('filter-function', {
179
191
  props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
180
- browsers: browsers
192
+ browsers: browsers,
193
+ feature: 'css-filter-function'
181
194
  });
182
195
  });
183
196
 
@@ -185,7 +198,8 @@
185
198
 
186
199
  feature(backdropFilter, function(browsers) {
187
200
  return prefix('backdrop-filter', {
188
- browsers: browsers
201
+ browsers: browsers,
202
+ feature: 'css-backdrop-filter'
189
203
  });
190
204
  });
191
205
 
@@ -194,16 +208,19 @@
194
208
  feature(elementFunction, function(browsers) {
195
209
  return prefix('element', {
196
210
  props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
197
- browsers: browsers
211
+ browsers: browsers,
212
+ feature: 'css-element-function'
198
213
  });
199
214
  });
200
215
 
201
216
  feature(require('caniuse-db/features-json/multicolumn.json'), function(browsers) {
202
217
  prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', {
203
- browsers: browsers
218
+ browsers: browsers,
219
+ feature: 'multicolumn'
204
220
  });
205
221
  return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', {
206
- browsers: browsers
222
+ browsers: browsers,
223
+ feature: 'multicolumn'
207
224
  });
208
225
  });
209
226
 
@@ -212,7 +229,8 @@
212
229
  feature(userSelectNone, function(browsers) {
213
230
  return prefix('user-select', {
214
231
  mistakes: ['-khtml-'],
215
- browsers: browsers
232
+ browsers: browsers,
233
+ feature: 'user-select-none'
216
234
  });
217
235
  });
218
236
 
@@ -230,13 +248,16 @@
230
248
  });
231
249
  prefix('display-flex', 'inline-flex', {
232
250
  props: ['display'],
233
- browsers: browsers
251
+ browsers: browsers,
252
+ feature: 'flexbox'
234
253
  });
235
254
  prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
236
- browsers: browsers
255
+ browsers: browsers,
256
+ feature: 'flexbox'
237
257
  });
238
258
  return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
239
- browsers: browsers
259
+ browsers: browsers,
260
+ feature: 'flexbox'
240
261
  });
241
262
  });
242
263
 
@@ -244,20 +265,24 @@
244
265
  match: /y\sx/
245
266
  }, function(browsers) {
246
267
  add('display-flex', 'inline-flex', {
247
- browsers: browsers
268
+ browsers: browsers,
269
+ feature: 'flexbox'
248
270
  });
249
271
  add('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
250
- browsers: browsers
272
+ browsers: browsers,
273
+ feature: 'flexbox'
251
274
  });
252
275
  return add('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
253
- browsers: browsers
276
+ browsers: browsers,
277
+ feature: 'flexbox'
254
278
  });
255
279
  });
256
280
 
257
281
  feature(require('caniuse-db/features-json/calc.json'), function(browsers) {
258
282
  return prefix('calc', {
259
283
  props: ['*'],
260
- browsers: browsers
284
+ browsers: browsers,
285
+ feature: 'calc'
261
286
  });
262
287
  });
263
288
 
@@ -265,26 +290,30 @@
265
290
 
266
291
  feature(bckgrndImgOpts, function(browsers) {
267
292
  return prefix('background-clip', 'background-origin', 'background-size', {
268
- browsers: browsers
293
+ browsers: browsers,
294
+ feature: 'background-img-opts'
269
295
  });
270
296
  });
271
297
 
272
298
  feature(require('caniuse-db/features-json/font-feature.json'), function(browsers) {
273
299
  return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', {
274
- browsers: browsers
300
+ browsers: browsers,
301
+ feature: 'font-feature'
275
302
  });
276
303
  });
277
304
 
278
305
  feature(require('caniuse-db/features-json/border-image.json'), function(browsers) {
279
306
  return prefix('border-image', {
280
- browsers: browsers
307
+ browsers: browsers,
308
+ feature: 'border-image'
281
309
  });
282
310
  });
283
311
 
284
312
  feature(require('caniuse-db/features-json/css-selection.json'), function(browsers) {
285
313
  return prefix('::selection', {
286
314
  selector: true,
287
- browsers: browsers
315
+ browsers: browsers,
316
+ feature: 'css-selection'
288
317
  });
289
318
  });
290
319
 
@@ -300,13 +329,15 @@
300
329
  });
301
330
  return prefix('::placeholder', {
302
331
  selector: true,
303
- browsers: browsers
332
+ browsers: browsers,
333
+ feature: 'css-placeholder'
304
334
  });
305
335
  });
306
336
 
307
337
  feature(require('caniuse-db/features-json/css-hyphens.json'), function(browsers) {
308
338
  return prefix('hyphens', {
309
- browsers: browsers
339
+ browsers: browsers,
340
+ feature: 'css-hyphens'
310
341
  });
311
342
  });
312
343
 
@@ -315,7 +346,8 @@
315
346
  feature(fullscreen, function(browsers) {
316
347
  return prefix(':fullscreen', {
317
348
  selector: true,
318
- browsers: browsers
349
+ browsers: browsers,
350
+ feature: 'fullscreen'
319
351
  });
320
352
  });
321
353
 
@@ -324,20 +356,23 @@
324
356
  }, function(browsers) {
325
357
  return prefix('::backdrop', {
326
358
  selector: true,
327
- browsers: browsers
359
+ browsers: browsers,
360
+ feature: 'fullscreen'
328
361
  });
329
362
  });
330
363
 
331
364
  feature(require('caniuse-db/features-json/css3-tabsize.json'), function(browsers) {
332
365
  return prefix('tab-size', {
333
- browsers: browsers
366
+ browsers: browsers,
367
+ feature: 'css3-tabsize'
334
368
  });
335
369
  });
336
370
 
337
371
  feature(require('caniuse-db/features-json/intrinsic-width.json'), function(browsers) {
338
372
  return prefix('max-content', 'min-content', 'fit-content', 'fill', 'fill-available', {
339
373
  props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size'],
340
- browsers: browsers
374
+ browsers: browsers,
375
+ feature: 'intrinsic-width'
341
376
  });
342
377
  });
343
378
 
@@ -346,7 +381,8 @@
346
381
  feature(cursorsNewer, function(browsers) {
347
382
  return prefix('zoom-in', 'zoom-out', {
348
383
  props: ['cursor'],
349
- browsers: browsers
384
+ browsers: browsers,
385
+ feature: 'css3-cursors-newer'
350
386
  });
351
387
  });
352
388
 
@@ -355,20 +391,23 @@
355
391
  feature(cursorsGrab, function(browsers) {
356
392
  return prefix('grab', 'grabbing', {
357
393
  props: ['cursor'],
358
- browsers: browsers
394
+ browsers: browsers,
395
+ feature: 'css3-cursors-grab'
359
396
  });
360
397
  });
361
398
 
362
399
  feature(require('caniuse-db/features-json/css-sticky.json'), function(browsers) {
363
400
  return prefix('sticky', {
364
401
  props: ['position'],
365
- browsers: browsers
402
+ browsers: browsers,
403
+ feature: 'css-sticky'
366
404
  });
367
405
  });
368
406
 
369
407
  feature(require('caniuse-db/features-json/pointer.json'), function(browsers) {
370
408
  return prefix('touch-action', {
371
- browsers: browsers
409
+ browsers: browsers,
410
+ feature: 'pointer'
372
411
  });
373
412
  });
374
413
 
@@ -376,7 +415,8 @@
376
415
 
377
416
  feature(decoration, function(browsers) {
378
417
  return prefix('text-decoration-style', 'text-decoration-color', 'text-decoration-line', {
379
- browsers: browsers
418
+ browsers: browsers,
419
+ feature: 'text-decoration'
380
420
  });
381
421
  });
382
422
 
@@ -384,7 +424,8 @@
384
424
  match: /x.*#3/
385
425
  }, function(browsers) {
386
426
  return prefix('text-decoration-skip', {
387
- browsers: browsers
427
+ browsers: browsers,
428
+ feature: 'text-decoration'
388
429
  });
389
430
  });
390
431
 
@@ -392,16 +433,19 @@
392
433
 
393
434
  feature(textSizeAdjust, function(browsers) {
394
435
  return prefix('text-size-adjust', {
395
- browsers: browsers
436
+ browsers: browsers,
437
+ feature: 'text-size-adjust'
396
438
  });
397
439
  });
398
440
 
399
441
  feature(require('caniuse-db/features-json/css-masks.json'), function(browsers) {
400
442
  prefix('mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source', {
401
- browsers: browsers
443
+ browsers: browsers,
444
+ feature: 'css-masks'
402
445
  });
403
446
  return prefix('clip-path', 'mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice', {
404
- browsers: browsers
447
+ browsers: browsers,
448
+ feature: 'css-masks'
405
449
  });
406
450
  });
407
451
 
@@ -409,25 +453,29 @@
409
453
 
410
454
  feature(boxdecorbreak, function(browsers) {
411
455
  return prefix('box-decoration-break', {
412
- browsers: browsers
456
+ browsers: browsers,
457
+ feature: 'css-boxdecorationbreak'
413
458
  });
414
459
  });
415
460
 
416
461
  feature(require('caniuse-db/features-json/object-fit.json'), function(browsers) {
417
462
  return prefix('object-fit', 'object-position', {
418
- browsers: browsers
463
+ browsers: browsers,
464
+ feature: 'object-fit'
419
465
  });
420
466
  });
421
467
 
422
468
  feature(require('caniuse-db/features-json/css-shapes.json'), function(browsers) {
423
469
  return prefix('shape-margin', 'shape-outside', 'shape-image-threshold', {
424
- browsers: browsers
470
+ browsers: browsers,
471
+ feature: 'css-shapes'
425
472
  });
426
473
  });
427
474
 
428
475
  feature(require('caniuse-db/features-json/text-overflow.json'), function(browsers) {
429
476
  return prefix('text-overflow', {
430
- browsers: browsers
477
+ browsers: browsers,
478
+ feature: 'text-overflow'
431
479
  });
432
480
  });
433
481
 
@@ -435,7 +483,8 @@
435
483
 
436
484
  feature(devdaptation, function(browsers) {
437
485
  return prefix('@viewport', {
438
- browsers: browsers
486
+ browsers: browsers,
487
+ feature: 'css-deviceadaptation'
439
488
  });
440
489
  });
441
490
 
@@ -445,7 +494,8 @@
445
494
  match: /( x($| )|a #3)/
446
495
  }, function(browsers) {
447
496
  return prefix('@resolution', {
448
- browsers: browsers
497
+ browsers: browsers,
498
+ feature: 'css-media-resolution'
449
499
  });
450
500
  });
451
501
 
@@ -453,7 +503,8 @@
453
503
 
454
504
  feature(textAlignLast, function(browsers) {
455
505
  return prefix('text-align-last', {
456
- browsers: browsers
506
+ browsers: browsers,
507
+ feature: 'css-text-align-last'
457
508
  });
458
509
  });
459
510
 
@@ -464,7 +515,8 @@
464
515
  }, function(browsers) {
465
516
  return prefix('pixelated', {
466
517
  props: ['image-rendering'],
467
- browsers: browsers
518
+ browsers: browsers,
519
+ feature: 'css-crisp-edges'
468
520
  });
469
521
  });
470
522
 
@@ -472,7 +524,8 @@
472
524
  match: /a x #2/
473
525
  }, function(browsers) {
474
526
  return prefix('image-rendering', {
475
- browsers: browsers
527
+ browsers: browsers,
528
+ feature: 'css-crisp-edges'
476
529
  });
477
530
  });
478
531
 
@@ -480,7 +533,8 @@
480
533
 
481
534
  feature(logicalProps, function(browsers) {
482
535
  return prefix('border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', {
483
- browsers: browsers
536
+ browsers: browsers,
537
+ feature: 'css-logical-props'
484
538
  });
485
539
  });
486
540
 
@@ -488,32 +542,37 @@
488
542
  match: /x\s#2/
489
543
  }, function(browsers) {
490
544
  return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', {
491
- browsers: browsers
545
+ browsers: browsers,
546
+ feature: 'css-logical-props'
492
547
  });
493
548
  });
494
549
 
495
550
  feature(require('caniuse-db/features-json/css-appearance.json'), function(browsers) {
496
551
  return prefix('appearance', {
497
- browsers: browsers
552
+ browsers: browsers,
553
+ feature: 'css-appearance'
498
554
  });
499
555
  });
500
556
 
501
557
  feature(require('caniuse-db/features-json/css-snappoints.json'), function(browsers) {
502
558
  return prefix('scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y', {
503
- browsers: browsers
559
+ browsers: browsers,
560
+ feature: 'css-snappoints'
504
561
  });
505
562
  });
506
563
 
507
564
  feature(require('caniuse-db/features-json/css-regions.json'), function(browsers) {
508
565
  return prefix('flow-into', 'flow-from', 'region-fragment', {
509
- browsers: browsers
566
+ browsers: browsers,
567
+ feature: 'css-regions'
510
568
  });
511
569
  });
512
570
 
513
571
  feature(require('caniuse-db/features-json/css-image-set.json'), function(browsers) {
514
572
  return prefix('image-set', {
515
573
  props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
516
- browsers: browsers
574
+ browsers: browsers,
575
+ feature: 'css-image-set'
517
576
  });
518
577
  });
519
578
 
@@ -523,14 +582,16 @@
523
582
  match: /a|x/
524
583
  }, function(browsers) {
525
584
  return prefix('writing-mode', {
526
- browsers: browsers
585
+ browsers: browsers,
586
+ feature: 'css-writing-mode'
527
587
  });
528
588
  });
529
589
 
530
590
  feature(require('caniuse-db/features-json/css-cross-fade.json'), function(browsers) {
531
591
  return prefix('cross-fade', {
532
592
  props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
533
- browsers: browsers
593
+ browsers: browsers,
594
+ feature: 'css-cross-fade'
534
595
  });
535
596
  });
536
597
 
@@ -539,13 +600,15 @@
539
600
  feature(readOnly, function(browsers) {
540
601
  return prefix(':read-only', ':read-write', {
541
602
  selector: true,
542
- browsers: browsers
603
+ browsers: browsers,
604
+ feature: 'css-read-only-write'
543
605
  });
544
606
  });
545
607
 
546
608
  feature(require('caniuse-db/features-json/text-emphasis.json'), function(browsers) {
547
609
  return prefix('text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color', {
548
- browsers: browsers
610
+ browsers: browsers,
611
+ feature: 'text-emphasis'
549
612
  });
550
613
  });
551
614
 
@@ -554,10 +617,12 @@
554
617
  feature(grid, function(browsers) {
555
618
  prefix('display-grid', 'inline-grid', {
556
619
  props: ['display'],
557
- browsers: browsers
620
+ browsers: browsers,
621
+ feature: 'css-grid'
558
622
  });
559
623
  return prefix('grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', {
560
- browsers: browsers
624
+ browsers: browsers,
625
+ feature: 'css-grid'
561
626
  });
562
627
  });
563
628
 
@@ -565,7 +630,8 @@
565
630
  match: /a x/
566
631
  }, function(browsers) {
567
632
  return prefix('justify-items', 'grid-row-align', {
568
- browsers: browsers
633
+ browsers: browsers,
634
+ feature: 'css-grid'
569
635
  });
570
636
  });
571
637
 
@@ -573,14 +639,16 @@
573
639
 
574
640
  feature(textSpacing, function(browsers) {
575
641
  return prefix('text-spacing', {
576
- browsers: browsers
642
+ browsers: browsers,
643
+ feature: 'css-text-spacing'
577
644
  });
578
645
  });
579
646
 
580
647
  feature(require('caniuse-db/features-json/css-any-link.json'), function(browsers) {
581
648
  return prefix(':any-link', {
582
649
  selector: true,
583
- browsers: browsers
650
+ browsers: browsers,
651
+ feature: 'css-any-link'
584
652
  });
585
653
  });
586
654
 
@@ -26,7 +26,7 @@
26
26
  if (Object.keys(prefixes.add).length > 2) {
27
27
  return;
28
28
  }
29
- return result.warn('Greetings, space traveller. ' + 'We are in the golden age of prefix-less CSS, ' + 'where Autoprefixer is no longer needed for your stylesheet.');
29
+ return result.warn('Greetings, time traveller. ' + 'We are in the golden age of prefix-less CSS, ' + 'where Autoprefixer is no longer needed for your stylesheet.');
30
30
  };
31
31
 
32
32
  module.exports = postcss.plugin('autoprefixer', function() {
@@ -23,7 +23,9 @@
23
23
  FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
24
24
  var already, cloned, dir, orient, ref, spec, value;
25
25
  ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
26
- if (spec === 2009) {
26
+ if (spec !== 2009) {
27
+ return FlexDirection.__super__.insert.apply(this, arguments);
28
+ } else {
27
29
  already = decl.parent.some(function(i) {
28
30
  return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
29
31
  });
@@ -47,8 +49,6 @@
47
49
  cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
48
50
  }
49
51
  return decl.parent.insertBefore(decl, cloned);
50
- } else {
51
- return FlexDirection.__super__.insert.apply(this, arguments);
52
52
  }
53
53
  };
54
54
 
@@ -14,15 +14,43 @@
14
14
  return FlexFlow.__super__.constructor.apply(this, arguments);
15
15
  }
16
16
 
17
- FlexFlow.names = ['flex-flow'];
17
+ FlexFlow.names = ['flex-flow', 'box-direction', 'box-orient'];
18
18
 
19
- FlexFlow.prototype.set = function(decl, prefix) {
20
- var ref, spec;
19
+ FlexFlow.prototype.insert = function(decl, prefix, prefixes) {
20
+ var already, cloned, dir, orient, ref, spec, value, values;
21
21
  ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
22
- if (spec === 2012) {
23
- return FlexFlow.__super__.set.apply(this, arguments);
24
- } else if (spec === 'final') {
25
- return FlexFlow.__super__.set.apply(this, arguments);
22
+ if (spec !== 2009) {
23
+ return FlexFlow.__super__.insert.apply(this, arguments);
24
+ } else {
25
+ values = decl.value.split(/\s+/).filter(function(i) {
26
+ return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
27
+ });
28
+ if (values.length === 0) {
29
+ return;
30
+ }
31
+ already = decl.parent.some(function(i) {
32
+ return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
33
+ });
34
+ if (already) {
35
+ return;
36
+ }
37
+ value = values[0];
38
+ orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
39
+ dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
40
+ cloned = this.clone(decl);
41
+ cloned.prop = prefix + 'box-orient';
42
+ cloned.value = orient;
43
+ if (this.needCascade(decl)) {
44
+ cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
45
+ }
46
+ decl.parent.insertBefore(decl, cloned);
47
+ cloned = this.clone(decl);
48
+ cloned.prop = prefix + 'box-direction';
49
+ cloned.value = dir;
50
+ if (this.needCascade(decl)) {
51
+ cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
52
+ }
53
+ return decl.parent.insertBefore(decl, cloned);
26
54
  }
27
55
  };
28
56
 
package/lib/prefixes.js CHANGED
@@ -328,7 +328,12 @@
328
328
  };
329
329
 
330
330
  Prefixes.prototype.unprefixed = function(prop) {
331
- return this.normalize(vendor.unprefixed(prop));
331
+ var value;
332
+ value = this.normalize(vendor.unprefixed(prop));
333
+ if (value === 'flex-direction') {
334
+ value = 'flex-flow';
335
+ }
336
+ return value;
332
337
  };
333
338
 
334
339
  Prefixes.prototype.normalize = function(prop) {
package/lib/processor.js CHANGED
@@ -184,6 +184,9 @@
184
184
  notHack = _this.prefixes.group(decl).down(function(other) {
185
185
  return _this.prefixes.normalize(other.prop) === unprefixed;
186
186
  });
187
+ if (unprefixed === 'flex-flow') {
188
+ notHack = true;
189
+ }
187
190
  if (notHack && !_this.withHackValue(decl)) {
188
191
  if (decl.raw('before').indexOf("\n") > -1) {
189
192
  _this.reduceSpaces(decl);
package/lib/supports.js CHANGED
@@ -68,10 +68,12 @@
68
68
  };
69
69
 
70
70
  Supports.prototype.prefixed = function(str) {
71
- var decl, j, k, len, len1, prefixer, prop, ref1, ref2, rule, value;
71
+ var decl, j, k, len, len1, prefixer, ref1, ref2, rule, value;
72
72
  rule = this.virtual(str);
73
- prop = rule.first.prop;
74
- prefixer = this.prefixer().add[prop];
73
+ if (this.disabled(rule.first)) {
74
+ return rule.nodes;
75
+ }
76
+ prefixer = this.prefixer().add[rule.first.prop];
75
77
  if (prefixer != null) {
76
78
  if (typeof prefixer.process === "function") {
77
79
  prefixer.process(rule.first);
@@ -80,7 +82,7 @@
80
82
  ref1 = rule.nodes;
81
83
  for (j = 0, len = ref1.length; j < len; j++) {
82
84
  decl = ref1[j];
83
- ref2 = this.prefixer().values('add', prop);
85
+ ref2 = this.prefixer().values('add', rule.first.prop);
84
86
  for (k = 0, len1 = ref2.length; k < len1; k++) {
85
87
  value = ref2[k];
86
88
  value.process(decl);
@@ -222,6 +224,28 @@
222
224
  return rule.params = brackets.stringify(ast);
223
225
  };
224
226
 
227
+ Supports.prototype.disabled = function(node) {
228
+ var other;
229
+ if (this.all.options.grid === false) {
230
+ if (node.prop === 'display' && node.value.indexOf('grid') !== -1) {
231
+ return true;
232
+ }
233
+ if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') {
234
+ return true;
235
+ }
236
+ }
237
+ if (this.all.options.flexbox === false) {
238
+ if (node.prop === 'display' && node.value.indexOf('flex') !== -1) {
239
+ return true;
240
+ }
241
+ other = ['order', 'justify-content', 'align-items', 'align-content'];
242
+ if (node.prop.indexOf('flex') !== -1 || other.indexOf(node.prop) !== -1) {
243
+ return true;
244
+ }
245
+ }
246
+ return false;
247
+ };
248
+
225
249
  return Supports;
226
250
 
227
251
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "6.6.0",
3
+ "version": "6.7.2",
4
4
  "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
5
5
  "keywords": [
6
6
  "autoprefixer",
@@ -13,17 +13,17 @@
13
13
  "license": "MIT",
14
14
  "repository": "postcss/autoprefixer",
15
15
  "dependencies": {
16
- "browserslist": "~1.5.1",
17
- "caniuse-db": "^1.0.30000602",
16
+ "browserslist": "^1.7.1",
17
+ "caniuse-db": "^1.0.30000618",
18
18
  "normalize-range": "^0.1.2",
19
19
  "num2fraction": "^1.2.2",
20
- "postcss": "^5.2.6",
20
+ "postcss": "^5.2.11",
21
21
  "postcss-value-parser": "^3.2.3"
22
22
  },
23
23
  "devDependencies": {
24
- "browserify": "^13.1.1",
24
+ "browserify": "^14.0.0",
25
25
  "eslint-config-postcss": "^2.0.2",
26
- "fs-extra": "^1.0.0",
26
+ "fs-extra": "^2.0.0",
27
27
  "gulp": "^3.9.1",
28
28
  "gulp-coffee": "^2.3.3",
29
29
  "gulp-eslint": "^3.0.1",
@@ -31,9 +31,9 @@
31
31
  "gulp-mocha": "^3.0.1",
32
32
  "gulp-replace": "^0.5.4",
33
33
  "mocha": "^3.2.0",
34
- "should": "^11.1.2",
34
+ "should": "^11.2.0",
35
35
  "vinyl-source-stream": "^1.1.0",
36
- "coffee-script": "^1.12.2"
36
+ "coffee-script": "^1.12.3"
37
37
  },
38
38
  "scripts": {
39
39
  "test": "gulp"