diff options
Diffstat (limited to 'src/css/curCSS.js')
-rw-r--r-- | src/css/curCSS.js | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 420d19fa9..260184b47 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -7,8 +7,7 @@ define([ ], function( jQuery, rnumnonpx, rmargin, getStyles ) { function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - style = elem.style; + var ret; computed = computed || getStyles( elem ); @@ -23,33 +22,10 @@ function curCSS( elem, name, computed ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } - - // Support: iOS < 6 - // A tribute to the "awesome hack by Dean Edwards" - // iOS < 6 (at least) returns percentage for a larger set of values, - // but width seems to be reliably pixels - // this is against the CSSOM draft spec: - // http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } } return ret !== undefined ? - // Support: IE + // Support: IE9-11+ // IE returns zIndex value as an integer. ret + "" : ret; |