autoprefixer 10.2.0 → 10.2.4

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,6 +1,18 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 10.2.4
5
+ * Fixed browser names in `npx autoprefixer --info`.
6
+
7
+ ## 10.2.3
8
+ * Fixed PostCSS 8 support.
9
+
10
+ ## 10.2.2
11
+ * Fixed PostCSS 8 plugins compatibility.
12
+
13
+ ## 10.2.1
14
+ * Fixed `transition-property` warnings (by @Sheraff).
15
+
4
16
  ## 10.2 “Sub rosa”
5
17
  * Added TypeScript definitions (by Dmitry Semigradsky).
6
18
  * Fixed docs (by Florian Pellet).
@@ -120,7 +120,7 @@ module.exports = (...reqs) => {
120
120
  })
121
121
 
122
122
  return {
123
- Once (root) {
123
+ OnceExit (root) {
124
124
  timeCapsule(result, prefixes)
125
125
  if (options.remove !== false) {
126
126
  prefixes.processor.remove(root, result)
package/lib/info.js CHANGED
@@ -7,12 +7,16 @@ function capitalize (str) {
7
7
  const NAMES = {
8
8
  ie: 'IE',
9
9
  ie_mob: 'IE Mobile',
10
- ios_saf: 'iOS',
10
+ ios_saf: 'iOS Safari',
11
11
  op_mini: 'Opera Mini',
12
12
  op_mob: 'Opera Mobile',
13
13
  and_chr: 'Chrome for Android',
14
14
  and_ff: 'Firefox for Android',
15
- and_uc: 'UC for Android'
15
+ and_uc: 'UC for Android',
16
+ and_qq: 'QQ Browser',
17
+ kaios: 'KaiOS Browser',
18
+ baidu: 'Baidu Browser',
19
+ samsung: 'Samsung Internet'
16
20
  }
17
21
 
18
22
  function prefix (name, prefixes, note) {
package/lib/prefixer.js CHANGED
@@ -18,7 +18,11 @@ function clone (obj, parent) {
18
18
  cloned[i] = value
19
19
  } else if (Array.isArray(value)) {
20
20
  cloned[i] = value.map(x => clone(x, cloned))
21
- } else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') {
21
+ } else if (
22
+ i !== '_autoprefixerPrefix' &&
23
+ i !== '_autoprefixerValues' &&
24
+ i !== 'proxyCache'
25
+ ) {
22
26
  if (typeof value === 'object' && value !== null) {
23
27
  value = clone(value, cloned)
24
28
  }
package/lib/transition.js CHANGED
@@ -118,6 +118,9 @@ class Transition {
118
118
  return
119
119
  }
120
120
 
121
+ let isPrefixed = false
122
+ let hasAssociatedProp = false
123
+
121
124
  decl.parent.each(i => {
122
125
  if (i.type !== 'decl') {
123
126
  return undefined
@@ -125,21 +128,31 @@ class Transition {
125
128
  if (i.prop.indexOf('transition-') !== 0) {
126
129
  return undefined
127
130
  }
131
+ let values = list.comma(i.value)
132
+ // check if current Rule's transition-property comma separated value list needs prefixes
128
133
  if (i.prop === 'transition-property') {
134
+ values.forEach(value => {
135
+ let lookup = this.prefixes.add[value]
136
+ if (lookup && lookup.prefixes && lookup.prefixes.length > 0) {
137
+ isPrefixed = true
138
+ }
139
+ })
129
140
  return undefined
130
141
  }
131
-
132
- if (list.comma(i.value).length > 1) {
133
- decl.warn(
134
- result,
135
- 'Replace transition-property to transition, ' +
136
- 'because Autoprefixer could not support ' +
137
- 'any cases of transition-property ' +
138
- 'and other transition-*'
139
- )
140
- }
142
+ // check if another transition-* prop in current Rule has comma separated value list
143
+ hasAssociatedProp = hasAssociatedProp || values.length > 1
141
144
  return false
142
145
  })
146
+
147
+ if (isPrefixed && hasAssociatedProp) {
148
+ decl.warn(
149
+ result,
150
+ 'Replace transition-property to transition, ' +
151
+ 'because Autoprefixer could not support ' +
152
+ 'any cases of transition-property ' +
153
+ 'and other transition-*'
154
+ )
155
+ }
143
156
  }
144
157
 
145
158
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "10.2.0",
3
+ "version": "10.2.4",
4
4
  "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "browserslist": "^4.16.1",
30
- "caniuse-lite": "^1.0.30001173",
30
+ "caniuse-lite": "^1.0.30001181",
31
31
  "colorette": "^1.2.1",
32
32
  "fraction.js": "^4.0.13",
33
33
  "normalize-range": "^0.1.2",