diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2018-04-23 21:00:14 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-04-08 19:26:08 +0200 |
commit | 00a9c2e5f4c855382435cec6b3908eb9bd5a53b7 (patch) | |
tree | 460e2907e1559eed4619bbdec9fc34f1cc6390b3 /src/effects | |
parent | c4f2fa2fb33d6e52f7c8fad9f687ef970f442179 (diff) | |
download | jquery-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.js | 5 |
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 ]; |