bower_components/jquery/src/css/curCSS.js in columbus3-0.4.0 vs bower_components/jquery/src/css/curCSS.js in columbus3-0.5.0

- old
+ new

@@ -1,36 +1,43 @@ -define([ +define( [ "../core", "./var/rnumnonpx", "./var/rmargin", "./var/getStyles", - "../selector" // contains -], function( jQuery, rnumnonpx, rmargin, getStyles ) { + "./support", + "../selector" // Get jQuery.contains +], function( jQuery, rnumnonpx, rmargin, getStyles, support ) { +"use strict"; + function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements style = elem.style; computed = computed || getStyles( elem ); - // Support: IE9 - // getPropertyValue is only needed for .css('filter') (#12537) + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; - } - if ( 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 ) ) { + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; @@ -45,13 +52,14 @@ style.maxWidth = maxWidth; } } return ret !== undefined ? - // Support: IE + + // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; } return curCSS; -}); +} );