autoprefixer 9.1.5 → 9.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 +76 -58
- package/README.md +61 -57
- package/data/prefixes.js +2 -15
- package/lib/browsers.js +1 -1
- package/lib/hacks/align-content.js +5 -3
- package/lib/hacks/align-items.js +5 -3
- package/lib/hacks/align-self.js +5 -3
- package/lib/hacks/appearance.js +2 -2
- package/lib/hacks/background-clip.js +2 -2
- package/lib/hacks/block-logical.js +4 -4
- package/lib/hacks/border-radius.js +2 -2
- package/lib/hacks/break-props.js +10 -6
- package/lib/hacks/flex-basis.js +2 -2
- package/lib/hacks/flex-direction.js +37 -37
- package/lib/hacks/flex-flow.js +38 -38
- package/lib/hacks/flex-grow.js +5 -3
- package/lib/hacks/flex-shrink.js +2 -2
- package/lib/hacks/flex.js +5 -3
- package/lib/hacks/fullscreen.js +5 -3
- package/lib/hacks/gradient.js +5 -5
- package/lib/hacks/grid-area.js +3 -1
- package/lib/hacks/grid-rows-columns.js +2 -2
- package/lib/hacks/grid-template-areas.js +2 -8
- package/lib/hacks/grid-template.js +2 -11
- package/lib/hacks/grid-utils.js +559 -239
- package/lib/hacks/image-rendering.js +2 -2
- package/lib/hacks/intrinsic.js +5 -3
- package/lib/hacks/justify-content.js +5 -3
- package/lib/hacks/order.js +7 -5
- package/lib/hacks/pixelated.js +10 -6
- package/lib/hacks/place-self.js +57 -0
- package/lib/hacks/placeholder.js +11 -5
- package/lib/hacks/writing-mode.js +2 -2
- package/lib/prefixer.js +1 -1
- package/lib/prefixes.js +1 -0
- package/lib/processor.js +125 -28
- package/lib/transition.js +3 -3
- package/lib/utils.js +16 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
|
4
|
+
## 9.3.1
|
|
5
|
+
* Fix Grid prefixes with `repeat()` value (by Bogdan Dolin).
|
|
6
|
+
|
|
7
|
+
## 9.3 “Labor omnia vincit”
|
|
8
|
+
* Add `place-self` support (by Bogdan Dolin).
|
|
9
|
+
* Fix Grid row/column span inheritance bug (by Bogdan Dolin).
|
|
10
|
+
|
|
11
|
+
## 9.2.1
|
|
12
|
+
* Fix broken AST.
|
|
13
|
+
|
|
14
|
+
## 9.2 “Onyi est glavnaya krepost”
|
|
15
|
+
* Add `/* autoprefixer grid: on */` control comment (by Andrey Alexandrov).
|
|
16
|
+
* Add duplicate `grid-area` support (by Bogdan Dolin).
|
|
17
|
+
* Fix `grid-gap` support for rules with different specifity (by Bogdan Dolin).
|
|
18
|
+
* Disable Grid in `@supports` at-rule with non-supported Grid features.
|
|
19
|
+
* Improve Grid warnings (by Daniel Tonon).
|
|
20
|
+
* Improve docs (by Joshua Hall, Mat Gadd, Roy Revelt, and Ivan).
|
|
21
|
+
|
|
4
22
|
## 9.1.5
|
|
5
23
|
* Remove `@babel/register` from dependencies.
|
|
6
24
|
|
|
@@ -510,46 +528,46 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
510
528
|
* Better `break-inside` support.
|
|
511
529
|
* Fix prefixing, when two same properties are near.
|
|
512
530
|
|
|
513
|
-
### 20140222
|
|
531
|
+
### 20140222
|
|
514
532
|
* Add `touch-action` support.
|
|
515
533
|
|
|
516
|
-
### 20140226
|
|
534
|
+
### 20140226
|
|
517
535
|
* Chrome 33 is moved to released versions.
|
|
518
536
|
* Add Chrome 36 data.
|
|
519
537
|
|
|
520
|
-
### 20140302
|
|
538
|
+
### 20140302
|
|
521
539
|
* Add `text-decoration-*` properties support.
|
|
522
540
|
* Update browsers usage statistics.
|
|
523
541
|
* Use new PostCSS version.
|
|
524
542
|
|
|
525
|
-
### 20140319
|
|
543
|
+
### 20140319
|
|
526
544
|
* Check already prefixed properties after current declaration.
|
|
527
545
|
* Normalize spaces before already prefixed check.
|
|
528
546
|
* Firefox 28 is moved to released versions.
|
|
529
547
|
* Add Firefox 31 data.
|
|
530
548
|
* Add some Blackberry data.
|
|
531
549
|
|
|
532
|
-
### 20140327
|
|
550
|
+
### 20140327
|
|
533
551
|
* Don’t use `-ms-transform` in `@keyframes`, because IE 9 doesn’t support
|
|
534
552
|
animations.
|
|
535
553
|
* Update BlackBerry 10 data.
|
|
536
554
|
|
|
537
|
-
### 20140403
|
|
555
|
+
### 20140403
|
|
538
556
|
* Update browsers usage statistics.
|
|
539
557
|
* Opera 20 is moved to released versions.
|
|
540
558
|
* Add Opera 22 data.
|
|
541
559
|
|
|
542
|
-
### 20140410
|
|
560
|
+
### 20140410
|
|
543
561
|
* Chrome 34 is moved to released versions.
|
|
544
562
|
* Add Chrome 37 data.
|
|
545
563
|
* Fix Chrome 36 data.
|
|
546
564
|
|
|
547
|
-
### 20140429
|
|
565
|
+
### 20140429
|
|
548
566
|
* Fix `display: inline-flex` support by 2009 spec.
|
|
549
567
|
* Fix old WebKit gradient converter (by Sergey Belov).
|
|
550
568
|
* Fix CSS 3 cursors data (by Nick Schonning).
|
|
551
569
|
|
|
552
|
-
### 20140430
|
|
570
|
+
### 20140430
|
|
553
571
|
* Separate 2D and 3D transform prefixes to clean unnecessary `-ms-` prefixes.
|
|
554
572
|
* Firefox 29 is moved to released versions.
|
|
555
573
|
* Add Firefox 32 data.
|
|
@@ -597,38 +615,38 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
597
615
|
* Binary now shows file name in syntax error.
|
|
598
616
|
* Use browserify to build standalone version.
|
|
599
617
|
|
|
600
|
-
### 20131225
|
|
618
|
+
### 20131225
|
|
601
619
|
* Fix deprecated API convertor.
|
|
602
620
|
* Add `::placeholder` support for Firefix >= 18.
|
|
603
621
|
* Fix vendor prefixes order.
|
|
604
622
|
|
|
605
|
-
### 20140103
|
|
623
|
+
### 20140103
|
|
606
624
|
* Add `-webkit-` prefix for `sticky` position.
|
|
607
625
|
* Update browsers popularity statistics.
|
|
608
626
|
|
|
609
|
-
### 20140109
|
|
627
|
+
### 20140109
|
|
610
628
|
* Add selectors and at-rules sections to debug info.
|
|
611
629
|
* Fix outdated prefixes cleaning.
|
|
612
630
|
|
|
613
|
-
### 20140110
|
|
631
|
+
### 20140110
|
|
614
632
|
* Add `Firefox ESR` browser requirement.
|
|
615
633
|
* Opera 18 is moved to released versions.
|
|
616
634
|
* Add Opera 20 data.
|
|
617
635
|
|
|
618
|
-
### 20140117
|
|
636
|
+
### 20140117
|
|
619
637
|
* Chrome 32 is moved to released versions.
|
|
620
638
|
* Add Opera 34 data.
|
|
621
639
|
|
|
622
|
-
### 20140130
|
|
640
|
+
### 20140130
|
|
623
641
|
* Fix flexbox properties names in transitions.
|
|
624
642
|
* Add Chrome 35 and Firefox 29 data.
|
|
625
643
|
|
|
626
|
-
### 20140203
|
|
644
|
+
### 20140203
|
|
627
645
|
* Android 4.4 stock browser and Opera 19 are moved to released versions.
|
|
628
646
|
* Add Opera 21 data.
|
|
629
647
|
* Update browsers usage statistics.
|
|
630
648
|
|
|
631
|
-
### 20140213
|
|
649
|
+
### 20140213
|
|
632
650
|
* Add case insensitive to IE’s filter hack (by Dominik Schilling).
|
|
633
651
|
* Improve selector prefixing in some rare cases (by Simon Lydell).
|
|
634
652
|
* Firefox 27 is moved to released versions.
|
|
@@ -647,71 +665,71 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
647
665
|
* Fix selector prefixes order.
|
|
648
666
|
* Fix browser versions order in inspect.
|
|
649
667
|
|
|
650
|
-
### 20130903
|
|
668
|
+
### 20130903
|
|
651
669
|
* Fix old WebKit gradients convertor on rgba() colors.
|
|
652
670
|
* Allow to write old direction syntax in gradients.
|
|
653
671
|
|
|
654
|
-
### 20130906
|
|
672
|
+
### 20130906
|
|
655
673
|
* Fix direction syntax in radial gradients.
|
|
656
674
|
* Don’t prefix IE filter with modern syntax.
|
|
657
675
|
|
|
658
|
-
### 20130911
|
|
676
|
+
### 20130911
|
|
659
677
|
* Fix parsing property name with spaces.
|
|
660
678
|
|
|
661
|
-
### 20130919
|
|
679
|
+
### 20130919
|
|
662
680
|
* Fix processing custom framework prefixes (by Johannes J. Schmidt).
|
|
663
681
|
* Concat outputs if several files compiled to one output.
|
|
664
682
|
* Decrease standalone build size by removing unnecessary Binary class.
|
|
665
683
|
* iOS 7 is moved to released versions.
|
|
666
684
|
* Clean up binary code (by Simon Lydell).
|
|
667
685
|
|
|
668
|
-
### 20130923
|
|
686
|
+
### 20130923
|
|
669
687
|
* Firefox 24 is moved to released versions.
|
|
670
688
|
|
|
671
|
-
### 20131001
|
|
689
|
+
### 20131001
|
|
672
690
|
* Add support for grab, grabbing, zoom-in and zoom-out cursor values.
|
|
673
691
|
|
|
674
|
-
### 20131006
|
|
692
|
+
### 20131006
|
|
675
693
|
* Chrome 30 is moved to released versions.
|
|
676
694
|
|
|
677
|
-
### 20131007
|
|
695
|
+
### 20131007
|
|
678
696
|
* Don’t add another prefixes in rule with prefixed selector.
|
|
679
697
|
|
|
680
|
-
### 20131009
|
|
698
|
+
### 20131009
|
|
681
699
|
* Opera 17 is moved to released versions.
|
|
682
700
|
|
|
683
|
-
### 20131015
|
|
701
|
+
### 20131015
|
|
684
702
|
* Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov).
|
|
685
703
|
|
|
686
|
-
### 20131017
|
|
704
|
+
### 20131017
|
|
687
705
|
* Fix @host at-rule parsing.
|
|
688
706
|
|
|
689
|
-
### 20131020
|
|
707
|
+
### 20131020
|
|
690
708
|
* IE 11 and Andrid 4.3 is moved to released versions.
|
|
691
709
|
* Add Opera 18 data.
|
|
692
710
|
* Add @namespace support.
|
|
693
711
|
* Sort browser versions in data file.
|
|
694
712
|
|
|
695
|
-
### 20131029
|
|
713
|
+
### 20131029
|
|
696
714
|
* Add Safari 6.1 data.
|
|
697
715
|
* Add fx alias for Firefox.
|
|
698
716
|
|
|
699
|
-
### 20131104
|
|
717
|
+
### 20131104
|
|
700
718
|
* Update Android future version to 4.4.
|
|
701
719
|
* Google Chrome 32 added to future versions list.
|
|
702
720
|
* Firefox 25 now is actual version, 27 and 28 added to future versions.
|
|
703
721
|
* Browsers statistics are updated.
|
|
704
722
|
|
|
705
|
-
### 20131205
|
|
723
|
+
### 20131205
|
|
706
724
|
* Google Chrome 33 added to future releases list.
|
|
707
725
|
* Google Chrome 31 moved to current releases list.
|
|
708
726
|
|
|
709
|
-
### 20131209
|
|
727
|
+
### 20131209
|
|
710
728
|
* Use old webkit gradients for old iOS and Safari (by Chad von Nau).
|
|
711
729
|
* Fix direction conversion for old webkit gradients (by Chad von Nau).
|
|
712
730
|
* Update browsers popularity statistics.
|
|
713
731
|
|
|
714
|
-
### 20131213
|
|
732
|
+
### 20131213
|
|
715
733
|
* Firefox ESR in default browsers was changed to 24 version.
|
|
716
734
|
* Firefox 26 was moved to current releases list.
|
|
717
735
|
* Firefox 28 was added to future releases list.
|
|
@@ -722,21 +740,21 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
722
740
|
* Allow to load support data from Can I Use pull requests.
|
|
723
741
|
* Remove deprecated API.
|
|
724
742
|
|
|
725
|
-
### 20130806
|
|
743
|
+
### 20130806
|
|
726
744
|
* Add hyphens support.
|
|
727
745
|
|
|
728
|
-
### 20130807
|
|
746
|
+
### 20130807
|
|
729
747
|
* Add tab-size support.
|
|
730
748
|
* Add :fullscreen support.
|
|
731
749
|
|
|
732
|
-
### 20130808
|
|
750
|
+
### 20130808
|
|
733
751
|
* Allow to select browser versions by > and >= operator.
|
|
734
752
|
* Fix flex properties in transition.
|
|
735
753
|
|
|
736
|
-
### 20130810
|
|
754
|
+
### 20130810
|
|
737
755
|
* Add Firefox 25 data.
|
|
738
756
|
|
|
739
|
-
### 20130824
|
|
757
|
+
### 20130824
|
|
740
758
|
* Add Chrome 31 and 30 data.
|
|
741
759
|
* Fix CSS comments parsing (by vladkens).
|
|
742
760
|
|
|
@@ -748,22 +766,22 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
748
766
|
* Add minor browsers in popularity select.
|
|
749
767
|
* Better syntax error messages.
|
|
750
768
|
|
|
751
|
-
### 20130721
|
|
769
|
+
### 20130721
|
|
752
770
|
* Add Chrome 30 data.
|
|
753
771
|
|
|
754
|
-
### 20130728
|
|
772
|
+
### 20130728
|
|
755
773
|
* Don’t remove non-standard -webkit-background-clip: text.
|
|
756
774
|
* Don’t remove IE hack on CSS parse.
|
|
757
775
|
|
|
758
|
-
### 20130729
|
|
776
|
+
### 20130729
|
|
759
777
|
* Add Opera 16 data.
|
|
760
778
|
* Fix “Invalid range in character class” error on Firefox.
|
|
761
779
|
|
|
762
|
-
### 20130730
|
|
780
|
+
### 20130730
|
|
763
781
|
* Fix correct clone comments inside keyframes (by Alexey Plutalov).
|
|
764
782
|
* Fix angle recalculation in gradients (by Roman Komarov).
|
|
765
783
|
|
|
766
|
-
### 20130731
|
|
784
|
+
### 20130731
|
|
767
785
|
* Add border-image support.
|
|
768
786
|
|
|
769
787
|
## 0.5 “Ours is the Fury”
|
|
@@ -771,27 +789,27 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
771
789
|
* Use css, instead of Rework, to fix CSS parsing errors faster.
|
|
772
790
|
* Fix a lot of CSS parsing errors.
|
|
773
791
|
|
|
774
|
-
### 20130616
|
|
792
|
+
### 20130616
|
|
775
793
|
* More useful message for CSS parsing errors.
|
|
776
794
|
* Remove old WebKit gradient syntax.
|
|
777
795
|
* Fix parsing error on comment with braces.
|
|
778
796
|
|
|
779
|
-
### 20130617
|
|
797
|
+
### 20130617
|
|
780
798
|
* Remove old Mozilla border-radius.
|
|
781
799
|
* Don’t prefix old IE filter.
|
|
782
800
|
* Remove old background-clip, background-size and background-origin prefixes.
|
|
783
801
|
* Speed up regexps in values.
|
|
784
802
|
* Allow to hack property declarations.
|
|
785
803
|
|
|
786
|
-
### 20130625
|
|
804
|
+
### 20130625
|
|
787
805
|
* Convert flexbox properties to 2009 and 2012 specifications.
|
|
788
806
|
* Improve messages on syntax errors.
|
|
789
807
|
|
|
790
|
-
### 20130626
|
|
808
|
+
### 20130626
|
|
791
809
|
* Add Firefox 24 data.
|
|
792
810
|
* Add prefixes for font-feature-settings.
|
|
793
811
|
|
|
794
|
-
### 20130629
|
|
812
|
+
### 20130629
|
|
795
813
|
* Fix convert flex properties to old box-flex.
|
|
796
814
|
|
|
797
815
|
## 0.4 “Winter Is Coming”
|
|
@@ -799,26 +817,26 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
799
817
|
* Add border-radius and box-shadow properties to database.
|
|
800
818
|
* Change degrees in webkit gradients.
|
|
801
819
|
|
|
802
|
-
### 20130515
|
|
820
|
+
### 20130515
|
|
803
821
|
* Add old syntax in gradient direction.
|
|
804
822
|
* Add old syntax for display: flex.
|
|
805
823
|
* Update browser global usage statistics.
|
|
806
824
|
|
|
807
|
-
### 20130521
|
|
825
|
+
### 20130521
|
|
808
826
|
* Add Firefox 23 data.
|
|
809
827
|
|
|
810
|
-
### 20130524
|
|
828
|
+
### 20130524
|
|
811
829
|
* Add Chrome 29 data.
|
|
812
830
|
|
|
813
|
-
### 20130528
|
|
831
|
+
### 20130528
|
|
814
832
|
* Fix compatibilty with Rework from git master.
|
|
815
833
|
* Add minor browsers to data, which can be selected only directly.
|
|
816
834
|
|
|
817
|
-
### 20130530
|
|
835
|
+
### 20130530
|
|
818
836
|
* Add Opera 15 and iOS 6.1 data.
|
|
819
837
|
* Fix iOS versions in properties and values data.
|
|
820
838
|
|
|
821
|
-
### 20130603
|
|
839
|
+
### 20130603
|
|
822
840
|
* Use latest Rework 0.15 with a lot of CSS parsing fixes.
|
|
823
841
|
* Update browsers usage statistics.
|
|
824
842
|
|
|
@@ -833,15 +851,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
833
851
|
* Add main to component config (by Jonathan Ong).
|
|
834
852
|
* Fix documentation (by Sergey Leschina and Mark Vasilkov).
|
|
835
853
|
|
|
836
|
-
### 20130424
|
|
854
|
+
### 20130424
|
|
837
855
|
* Fix value override in prefixer.
|
|
838
856
|
|
|
839
|
-
### 20130427
|
|
857
|
+
### 20130427
|
|
840
858
|
* Prefix several same values in one property.
|
|
841
859
|
* Fix Windows support in binary.
|
|
842
860
|
* Improve print errors in binary.
|
|
843
861
|
|
|
844
|
-
### 20130502
|
|
862
|
+
### 20130502
|
|
845
863
|
* Don’t add -webkit- prefix to IE filter.
|
|
846
864
|
* Don’t duplicate prefixes on second run.
|
|
847
865
|
|
package/README.md
CHANGED
|
@@ -53,21 +53,20 @@ Twitter account for news and releases: [@autoprefixer].
|
|
|
53
53
|
## Browsers
|
|
54
54
|
|
|
55
55
|
Autoprefixer uses [Browserslist], so you can specify the browsers
|
|
56
|
-
you want to target in your project
|
|
56
|
+
you want to target in your project with queries like `> 5%`
|
|
57
57
|
(see [Best Practices]).
|
|
58
58
|
|
|
59
|
-
The best way to provide browsers is `.browserslistrc`
|
|
60
|
-
or
|
|
59
|
+
The best way to provide browsers is a `.browserslistrc` file in your project
|
|
60
|
+
root, or by adding a `browserslist` key to your `package.json`.
|
|
61
61
|
|
|
62
|
-
We recommend
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
We recommend the use of these options over passing options to Autoprefixer so
|
|
63
|
+
that the config can be shared with other tools such as [babel-preset-env] and
|
|
64
|
+
[Stylelint].
|
|
65
65
|
|
|
66
|
-
See [Browserslist docs] for queries, browser names, config format,
|
|
67
|
-
and default value.
|
|
66
|
+
See [Browserslist docs] for queries, browser names, config format, and defaults.
|
|
68
67
|
|
|
69
68
|
[Browserslist docs]: https://github.com/ai/browserslist#queries
|
|
70
|
-
[babel-preset-env]: https://github.com/babel/babel-preset-env
|
|
69
|
+
[babel-preset-env]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
|
|
71
70
|
[Best Practices]: https://github.com/browserslist/browserslist#best-practices
|
|
72
71
|
[Browserslist]: https://github.com/ai/browserslist
|
|
73
72
|
[Stylelint]: http://stylelint.io/
|
|
@@ -77,19 +76,18 @@ and default value.
|
|
|
77
76
|
|
|
78
77
|
#### Does Autoprefixer polyfill Grid Layout for IE?
|
|
79
78
|
|
|
80
|
-
Autoprefixer can be used to use Grid Layout for IE 10 and IE 11
|
|
81
|
-
|
|
82
|
-
This is why it is disabled by default.
|
|
79
|
+
Autoprefixer can be used to use Grid Layout for IE 10 and IE 11, but this
|
|
80
|
+
polyfill will not work in 100% of cases. This is why it is disabled by default.
|
|
83
81
|
|
|
84
|
-
First, you need to enable Grid prefixes by `grid: true` option.
|
|
82
|
+
First, you need to enable Grid prefixes by `grid: true` option or `/* autoprefixer grid: on */` comment.
|
|
85
83
|
|
|
86
|
-
Second, you need to test every fix with Grid in IE. It is not
|
|
87
|
-
|
|
84
|
+
Second, you need to test every fix with Grid in IE. It is not an enable and
|
|
85
|
+
forget feature, but it is still very useful.
|
|
88
86
|
Financial Times and Yandex use it in production.
|
|
89
87
|
|
|
90
|
-
Third, there is
|
|
91
|
-
explicitly.
|
|
92
|
-
|
|
88
|
+
Third, there is no auto placement, so all grid cell positions must be set
|
|
89
|
+
explicitly. Autoprefixer _can_ covert `grid-template` and `grid-gap`, but only
|
|
90
|
+
when both are used together.
|
|
93
91
|
|
|
94
92
|
```css
|
|
95
93
|
.page {
|
|
@@ -132,19 +130,18 @@ See also:
|
|
|
132
130
|
Many other tools contain Autoprefixer. For example, webpack uses Autoprefixer
|
|
133
131
|
to minify CSS by cleaning unnecessary prefixes.
|
|
134
132
|
|
|
135
|
-
If you
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Autoprefixer added.
|
|
133
|
+
If you pass your browsers to Autoprefixer using its `browsers` option, the other
|
|
134
|
+
tools will use their own config, leading webpack to remove the prefixes that
|
|
135
|
+
the first Autoprefixer added.
|
|
139
136
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
browsers list.
|
|
137
|
+
To avoid this, ensure you use either the [browserslist config file] or
|
|
138
|
+
`browsers` key in your `package.json`, so that all tools (Autoprefixer,
|
|
139
|
+
cssnano, doiuse, cssnext, etc) use the same browsers list.
|
|
143
140
|
|
|
144
|
-
[
|
|
141
|
+
[browserslist config file]: https://github.com/ai/browserslist#config-file
|
|
145
142
|
|
|
146
143
|
|
|
147
|
-
#### What is unprefixed version
|
|
144
|
+
#### What is the unprefixed version of `-webkit-min-device-pixel-ratio`?
|
|
148
145
|
|
|
149
146
|
```css
|
|
150
147
|
@media (min-resolution: 2dppx) {
|
|
@@ -194,16 +191,13 @@ Developers are often surprised by how few prefixes are required today.
|
|
|
194
191
|
If Autoprefixer doesn’t add prefixes to your CSS, check if they’re still
|
|
195
192
|
required on [Can I Use].
|
|
196
193
|
|
|
197
|
-
|
|
194
|
+
[Can I Use]: http://caniuse.com/
|
|
198
195
|
|
|
199
|
-
[list with all supported]: https://github.com/postcss/autoprefixer/wiki/support-list
|
|
200
|
-
[Can I Use]: http://caniuse.com/
|
|
201
196
|
|
|
197
|
+
#### Why does Autoprefixer use unprefixed properties in `@-webkit-keyframes`?
|
|
202
198
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
Browser teams can remove some prefixes before others. So we try to use
|
|
206
|
-
all combinations of prefixed/unprefixed values.
|
|
199
|
+
Browser teams can remove some prefixes before others, so we try to use all
|
|
200
|
+
combinations of prefixed/unprefixed values.
|
|
207
201
|
|
|
208
202
|
|
|
209
203
|
#### How to work with legacy `-webkit-` only code?
|
|
@@ -212,7 +206,7 @@ Autoprefixer needs unprefixed property to add prefixes. So if you only
|
|
|
212
206
|
wrote `-webkit-gradient` without W3C’s `gradient`,
|
|
213
207
|
Autoprefixer will not add other prefixes.
|
|
214
208
|
|
|
215
|
-
But [PostCSS] has
|
|
209
|
+
But [PostCSS] has plugins to convert CSS to unprefixed state.
|
|
216
210
|
Use [postcss-unprefix] before Autoprefixer.
|
|
217
211
|
|
|
218
212
|
[postcss-unprefix]: https://github.com/gucong3000/postcss-unprefix
|
|
@@ -221,13 +215,19 @@ Use [postcss-unprefix] before Autoprefixer.
|
|
|
221
215
|
#### Does Autoprefixer add `-epub-` prefix?
|
|
222
216
|
|
|
223
217
|
No, Autoprefixer works only with browsers prefixes from Can I Use.
|
|
224
|
-
But you can use [postcss-epub]
|
|
218
|
+
But you can use [postcss-epub]
|
|
225
219
|
for prefixing ePub3 properties.
|
|
226
220
|
|
|
221
|
+
[postcss-epub]: https://github.com/Rycochet/postcss-epub
|
|
222
|
+
|
|
227
223
|
|
|
228
224
|
#### Why doesn’t Autoprefixer transform generic font-family `system-ui`?
|
|
229
225
|
|
|
230
|
-
`system-ui` is technically not a prefix and the transformation is not
|
|
226
|
+
`system-ui` is technically not a prefix and the transformation is not
|
|
227
|
+
future-proof. You can use [postcss-font-family-system-ui] to transform
|
|
228
|
+
`system-ui` to a practical font-family list.
|
|
229
|
+
|
|
230
|
+
[postcss-font-family-system-ui]: https://github.com/JLHwung/postcss-font-family-system-ui
|
|
231
231
|
|
|
232
232
|
|
|
233
233
|
## Usage
|
|
@@ -253,8 +253,8 @@ gulp.task('autoprefixer', function () {
|
|
|
253
253
|
With `gulp-postcss` you also can combine Autoprefixer
|
|
254
254
|
with [other PostCSS plugins].
|
|
255
255
|
|
|
256
|
-
[other PostCSS plugins]: https://github.com/postcss/postcss#plugins
|
|
257
256
|
[gulp-postcss]: https://github.com/postcss/gulp-postcss
|
|
257
|
+
[other PostCSS plugins]: https://github.com/postcss/postcss#plugins
|
|
258
258
|
|
|
259
259
|
|
|
260
260
|
### Webpack
|
|
@@ -391,7 +391,7 @@ See `postcss -h` for help.
|
|
|
391
391
|
### JavaScript
|
|
392
392
|
|
|
393
393
|
You can use Autoprefixer with [PostCSS] in your Node.js application
|
|
394
|
-
or if you want to develop an Autoprefixer plugin for new environment.
|
|
394
|
+
or if you want to develop an Autoprefixer plugin for a new environment.
|
|
395
395
|
|
|
396
396
|
```js
|
|
397
397
|
var autoprefixer = require('autoprefixer');
|
|
@@ -405,7 +405,7 @@ postcss([ autoprefixer ]).process(css).then(function (result) {
|
|
|
405
405
|
});
|
|
406
406
|
```
|
|
407
407
|
|
|
408
|
-
There is also [standalone build] for the browser or
|
|
408
|
+
There is also a [standalone build] for the browser or for a non-Node.js runtime.
|
|
409
409
|
|
|
410
410
|
You can use [html-autoprefixer] to process HTML with inlined CSS.
|
|
411
411
|
|
|
@@ -418,26 +418,26 @@ You can use [html-autoprefixer] to process HTML with inlined CSS.
|
|
|
418
418
|
|
|
419
419
|
Autoprefixer should be used in assets build tools. Text editor plugins are not
|
|
420
420
|
a good solution, because prefixes decrease code readability and you will need
|
|
421
|
-
to change
|
|
421
|
+
to change values in all prefixed properties.
|
|
422
422
|
|
|
423
423
|
I recommend you to learn how to use build tools like [Gulp].
|
|
424
424
|
They work much better and will open you a whole new world of useful plugins
|
|
425
|
-
and
|
|
425
|
+
and automation.
|
|
426
426
|
|
|
427
|
-
|
|
427
|
+
If you can’t move to a build tool, you can use text editor plugins:
|
|
428
428
|
|
|
429
429
|
* [Sublime Text](https://github.com/sindresorhus/sublime-autoprefixer)
|
|
430
430
|
* [Brackets](https://github.com/mikaeljorhult/brackets-autoprefixer)
|
|
431
431
|
* [Atom Editor](https://github.com/sindresorhus/atom-autoprefixer)
|
|
432
|
-
* [Visual Studio](
|
|
432
|
+
* [Visual Studio](https://github.com/madskristensen/WebCompiler)
|
|
433
433
|
|
|
434
434
|
[Gulp]: http://gulpjs.com/
|
|
435
435
|
|
|
436
436
|
|
|
437
437
|
## Warnings
|
|
438
438
|
|
|
439
|
-
Autoprefixer uses the [PostCSS warning API] to warn about really important
|
|
440
|
-
in your CSS:
|
|
439
|
+
Autoprefixer uses the [PostCSS warning API] to warn about really important
|
|
440
|
+
problems in your CSS:
|
|
441
441
|
|
|
442
442
|
* Old direction syntax in gradients.
|
|
443
443
|
* Old unprefixed `display: box` instead of `display: flex`
|
|
@@ -451,7 +451,7 @@ result.warnings().forEach(function (warn) {
|
|
|
451
451
|
});
|
|
452
452
|
```
|
|
453
453
|
|
|
454
|
-
Every Autoprefixer runner should display
|
|
454
|
+
Every Autoprefixer runner should display these warnings.
|
|
455
455
|
|
|
456
456
|
[PostCSS warning API]: https://github.com/postcss/postcss/blob/master/docs/api.md#warning-class
|
|
457
457
|
|
|
@@ -471,14 +471,16 @@ a {
|
|
|
471
471
|
}
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
If some prefixes were generated
|
|
475
|
-
|
|
474
|
+
If some prefixes were generated incorrectly, please create an [issue on GitHub].
|
|
475
|
+
|
|
476
|
+
[issue on GitHub]: https://github.com/postcss/autoprefixer/issues
|
|
476
477
|
|
|
477
478
|
|
|
478
479
|
### Features
|
|
479
480
|
|
|
480
|
-
You can use these plugin options to disable some of
|
|
481
|
+
You can use these plugin options to disable some of Autoprefixer’s features.
|
|
481
482
|
|
|
483
|
+
* `grid: true` will enable `-ms-` prefixes for Grid Layout.
|
|
482
484
|
* `supports: false` will disable `@supports` parameters prefixing.
|
|
483
485
|
* `flexbox: false` will disable flexbox properties prefixing.
|
|
484
486
|
Or `flexbox: "no-2009"` will add prefixes only for final and IE
|
|
@@ -499,26 +501,27 @@ you can use control comments to disable Autoprefixer.
|
|
|
499
501
|
|
|
500
502
|
```css
|
|
501
503
|
.a {
|
|
502
|
-
transition: 1s; /*
|
|
504
|
+
transition: 1s; /* will be prefixed */
|
|
503
505
|
}
|
|
504
506
|
|
|
505
507
|
.b {
|
|
506
508
|
/* autoprefixer: off */
|
|
507
|
-
transition: 1s; /*
|
|
509
|
+
transition: 1s; /* will not be prefixed */
|
|
508
510
|
}
|
|
509
511
|
|
|
510
512
|
.c {
|
|
511
513
|
/* autoprefixer: ignore next */
|
|
512
|
-
transition: 1s; /*
|
|
513
|
-
mask: url(image.png); /*
|
|
514
|
+
transition: 1s; /* will not be prefixed */
|
|
515
|
+
mask: url(image.png); /* will be prefixed */
|
|
514
516
|
}
|
|
515
517
|
```
|
|
516
518
|
|
|
517
|
-
There are
|
|
519
|
+
There are three types of control comments:
|
|
518
520
|
|
|
519
521
|
* `/* autoprefixer: off */` disable the whole block *before* and after comment.
|
|
520
522
|
* `/* autoprefixer: ignore next */` disable only next property
|
|
521
523
|
or next rule selector or at-rule parameters (but not rule/at‑rule body).
|
|
524
|
+
* `/* autoprefixer grid: on */` enable grid option. Use `off` to disable this option.
|
|
522
525
|
|
|
523
526
|
You can also use comments recursively:
|
|
524
527
|
|
|
@@ -535,7 +538,7 @@ You can also use comments recursively:
|
|
|
535
538
|
|
|
536
539
|
## Options
|
|
537
540
|
|
|
538
|
-
Function `autoprefixer(options)` returns new PostCSS plugin.
|
|
541
|
+
Function `autoprefixer(options)` returns a new PostCSS plugin.
|
|
539
542
|
See [PostCSS API] for plugin usage documentation.
|
|
540
543
|
|
|
541
544
|
```js
|
|
@@ -556,7 +559,8 @@ Available options are:
|
|
|
556
559
|
properties. With `"no-2009"` value Autoprefixer will add prefixes only
|
|
557
560
|
for final and IE versions of specification. Default is `true`.
|
|
558
561
|
* `grid` (boolean): should Autoprefixer add IE prefixes for Grid Layout
|
|
559
|
-
properties. Default is `false`.
|
|
562
|
+
properties. Default is `false`. You can also use `/* autoprefixer grid: on */`
|
|
563
|
+
comment in CSS.
|
|
560
564
|
* `stats` (object): custom [usage statistics] for `> 10% in my stats`
|
|
561
565
|
browsers query.
|
|
562
566
|
* `browsers` (array): list of queries for target browsers. Try to not use it.
|
package/data/prefixes.js
CHANGED
|
@@ -328,23 +328,10 @@ f(require('caniuse-lite/data/features/css-selection'), function (browsers) {
|
|
|
328
328
|
}); // Placeholder selector
|
|
329
329
|
|
|
330
330
|
f(require('caniuse-lite/data/features/css-placeholder'), function (browsers) {
|
|
331
|
-
browsers = browsers.map(function (i) {
|
|
332
|
-
var _i$split = i.split(' '),
|
|
333
|
-
name = _i$split[0],
|
|
334
|
-
version = _i$split[1];
|
|
335
|
-
|
|
336
|
-
if (name === 'firefox' && parseFloat(version) <= 18) {
|
|
337
|
-
return i + ' old';
|
|
338
|
-
} else if (name === 'ie') {
|
|
339
|
-
return i + ' old';
|
|
340
|
-
} else {
|
|
341
|
-
return i;
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
331
|
prefix(['::placeholder'], {
|
|
345
332
|
selector: true,
|
|
346
333
|
feature: 'css-placeholder',
|
|
347
|
-
browsers: browsers
|
|
334
|
+
browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old'])
|
|
348
335
|
});
|
|
349
336
|
}); // Hyphenation
|
|
350
337
|
|
|
@@ -638,7 +625,7 @@ f(grid, function (browsers) {
|
|
|
638
625
|
feature: 'css-grid',
|
|
639
626
|
browsers: browsers
|
|
640
627
|
});
|
|
641
|
-
prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas'], {
|
|
628
|
+
prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas', 'place-self'], {
|
|
642
629
|
feature: 'css-grid',
|
|
643
630
|
browsers: browsers
|
|
644
631
|
});
|