autoprefixer 8.6.4 → 8.6.5
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 +3 -0
- package/README.md +44 -68
- package/lib/processor.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -50,48 +50,6 @@ Twitter account for news and releases: [@autoprefixer].
|
|
|
50
50
|
[cult]: http://cultofmartians.com/tasks/autoprefixer-grid.html
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
## Features
|
|
54
|
-
|
|
55
|
-
### Write Pure CSS
|
|
56
|
-
|
|
57
|
-
Working with Autoprefixer is simple: just forget about vendor prefixes
|
|
58
|
-
and write normal CSS according to the latest W3C specs. You don’t need
|
|
59
|
-
a special language (like Sass) or remember where you must use mixins.
|
|
60
|
-
|
|
61
|
-
Autoprefixer supports selectors (like `:fullscreen` and `::selection`),
|
|
62
|
-
unit function (`calc()`), at‑rules (`@supports` and `@keyframes`)
|
|
63
|
-
and properties.
|
|
64
|
-
|
|
65
|
-
Because Autoprefixer is a postprocessor for CSS,
|
|
66
|
-
you can also use it with preprocessors such as Sass, Stylus or LESS.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Only Actual Prefixes
|
|
70
|
-
|
|
71
|
-
Autoprefixer utilizes the most recent data from [Can I Use]
|
|
72
|
-
to add only necessary vendor prefixes.
|
|
73
|
-
|
|
74
|
-
It also removes old, unnecessary prefixes from your CSS
|
|
75
|
-
(like `border-radius` prefixes, produced by many CSS libraries).
|
|
76
|
-
|
|
77
|
-
```css
|
|
78
|
-
a {
|
|
79
|
-
-webkit-border-radius: 5px;
|
|
80
|
-
border-radius: 5px;
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
compiles to:
|
|
85
|
-
|
|
86
|
-
```css
|
|
87
|
-
a {
|
|
88
|
-
border-radius: 5px;
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
[Can I Use]: http://caniuse.com/
|
|
93
|
-
|
|
94
|
-
|
|
95
53
|
## Browsers
|
|
96
54
|
|
|
97
55
|
Autoprefixer uses [Browserslist], so you can specify the browsers
|
|
@@ -115,34 +73,59 @@ and default value.
|
|
|
115
73
|
[Stylelint]: http://stylelint.io/
|
|
116
74
|
|
|
117
75
|
|
|
118
|
-
##
|
|
76
|
+
## FAQ
|
|
119
77
|
|
|
120
|
-
|
|
78
|
+
#### Does Autoprefixer polyfill Grid Layout for IE?
|
|
121
79
|
|
|
122
|
-
|
|
123
|
-
|
|
80
|
+
Autoprefixer can be used to use Grid Layout for IE 10 and IE 11.
|
|
81
|
+
But this polyfill will not work in 100 % cases.
|
|
82
|
+
This is why it is disabled by default.
|
|
124
83
|
|
|
125
|
-
|
|
126
|
-
prefixes, but will not add any new prefixes.
|
|
84
|
+
First, you need to enable Grid prefixes by `grid: true` option.
|
|
127
85
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
add the necessary prefixes again:
|
|
86
|
+
Second, you need to test every fix with Grid in IE. It is not,
|
|
87
|
+
enable and forget featur. But it is still very useful.
|
|
88
|
+
Financial Times and Yandex use it in production.
|
|
132
89
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
90
|
+
Third, there is not auto placement and all grid cell position must be set
|
|
91
|
+
explicitly. However, Autoprefixer can covert even `grid-template`
|
|
92
|
+
and `grid-gap` (but only when they are together).
|
|
136
93
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
94
|
+
```css
|
|
95
|
+
.page {
|
|
96
|
+
display: grid;
|
|
97
|
+
grid-gap: 33px;
|
|
98
|
+
grid-template:
|
|
99
|
+
"head head head" 1fr
|
|
100
|
+
"nav main main" minmax(100px, 1fr)
|
|
101
|
+
"nav foot foot" 2fr /
|
|
102
|
+
1fr 100px 1fr;
|
|
103
|
+
}
|
|
104
|
+
.page__head {
|
|
105
|
+
grid-area: head;
|
|
106
|
+
}
|
|
107
|
+
.page__nav {
|
|
108
|
+
grid-area: nav;
|
|
109
|
+
}
|
|
110
|
+
.page__main {
|
|
111
|
+
grid-area: main;
|
|
112
|
+
}
|
|
113
|
+
.page__footer {
|
|
114
|
+
grid-area: foot;
|
|
115
|
+
}
|
|
142
116
|
```
|
|
143
117
|
|
|
118
|
+
See also:
|
|
144
119
|
|
|
145
|
-
|
|
120
|
+
* [The guide about Grids in IE and Autoprefixer].
|
|
121
|
+
* [`postcss-gap-properties`] to use new `gap` property
|
|
122
|
+
instead of old `grid-gap`.
|
|
123
|
+
* [`postcss-grid-kiss`] has alternate “everything in one property” syntax,
|
|
124
|
+
which make using Autoprefixer’s Grid safer.
|
|
125
|
+
|
|
126
|
+
[The guide about Grids in IE and Autoprefixer]: https://css-tricks.com/css-grid-in-ie-css-grid-and-the-new-autoprefixer/
|
|
127
|
+
[`postcss-gap-properties`]: https://github.com/jonathantneal/postcss-gap-properties
|
|
128
|
+
[`postcss-grid-kiss`]: https://github.com/sylvainpolletvillard/postcss-grid-kiss
|
|
146
129
|
|
|
147
130
|
#### No prefixes in production
|
|
148
131
|
|
|
@@ -549,13 +532,6 @@ You can also use comments recursively:
|
|
|
549
532
|
}
|
|
550
533
|
```
|
|
551
534
|
|
|
552
|
-
In Sass/SCSS/Less you can use all the disable options above, add an exclamation mark
|
|
553
|
-
in the start of comment:
|
|
554
|
-
|
|
555
|
-
```scss
|
|
556
|
-
/*! autoprefixer: off */
|
|
557
|
-
```
|
|
558
|
-
|
|
559
535
|
|
|
560
536
|
## Options
|
|
561
537
|
|
package/lib/processor.js
CHANGED
|
@@ -83,7 +83,8 @@ var Processor = function () {
|
|
|
83
83
|
result.warn('You should use 2 values for text-emphasis-position ' + 'For example, `under left` instead of just `under`.', { node: decl });
|
|
84
84
|
}
|
|
85
85
|
} else {
|
|
86
|
-
|
|
86
|
+
var grid = _this.prefixes.add['grid-area'];
|
|
87
|
+
if (_this.prefixes.options.grid && grid && grid.prefixes) {
|
|
87
88
|
if (prop === 'grid-auto-columns') {
|
|
88
89
|
result.warn('grid-auto-columns is not supported by IE', { node: decl });
|
|
89
90
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autoprefixer",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.5",
|
|
4
4
|
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
|
|
5
5
|
"keywords": ["autoprefixer", "css", "prefix", "postcss", "postcss-plugin"],
|
|
6
6
|
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"repository": "postcss/autoprefixer",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"browserslist": "^3.2.8",
|
|
11
|
-
"caniuse-lite": "^1.0.
|
|
11
|
+
"caniuse-lite": "^1.0.30000864",
|
|
12
12
|
"normalize-range": "^0.1.2",
|
|
13
13
|
"num2fraction": "^1.2.2",
|
|
14
14
|
"postcss": "^6.0.23",
|