autoprefixer 10.2.0 → 10.2.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,6 +1,9 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 10.2.1
5
+ * Fixed `transition-property` warnings (by @Sheraff).
6
+
4
7
  ## 10.2 “Sub rosa”
5
8
  * Added TypeScript definitions (by Dmitry Semigradsky).
6
9
  * Fixed docs (by Florian Pellet).
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.1",
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"