aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2018-04-23 21:00:14 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-04-08 19:26:08 +0200
commit00a9c2e5f4c855382435cec6b3908eb9bd5a53b7 (patch)
tree460e2907e1559eed4619bbdec9fc34f1cc6390b3 /src/effects
parentc4f2fa2fb33d6e52f7c8fad9f687ef970f442179 (diff)
downloadjquery-00a9c2e5f4c855382435cec6b3908eb9bd5a53b7.tar.gz
jquery-00a9c2e5f4c855382435cec6b3908eb9bd5a53b7.zip
CSS: Don't automatically add "px" to properties with a few exceptions
Fixes gh-2795 Closes gh-4055 Ref gh-4009
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/Tween.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/effects/Tween.js b/src/effects/Tween.js
index bf501ead0..f8c847f97 100644
--- a/src/effects/Tween.js
+++ b/src/effects/Tween.js
@@ -1,9 +1,10 @@
define( [
"../core",
+ "../css/isAutoPx",
"../css/finalPropName",
"../css"
-], function( jQuery, finalPropName ) {
+], function( jQuery, isAutoPx, finalPropName ) {
"use strict";
@@ -21,7 +22,7 @@ Tween.prototype = {
this.options = options;
this.start = this.now = this.cur();
this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ this.unit = unit || ( isAutoPx( prop ) ? "px" : "" );
},
cur: function() {
var hooks = Tween.propHooks[ this.prop ];