From 00a9c2e5f4c855382435cec6b3908eb9bd5a53b7 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 23 Apr 2018 21:00:14 +0200 Subject: CSS: Don't automatically add "px" to properties with a few exceptions Fixes gh-2795 Closes gh-4055 Ref gh-4009 --- src/effects/Tween.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/effects') 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 ]; -- cgit v1.2.3