7 "../selector" // contains
8 ], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
10 function curCSS( elem, name, computed ) {
11 var width, minWidth, maxWidth, ret,
14 computed = computed || getStyles( elem );
17 // getPropertyValue is only needed for .css('filter') (#12537)
19 ret = computed.getPropertyValue( name ) || computed[ name ];
24 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
25 ret = jQuery.style( elem, name );
28 // A tribute to the "awesome hack by Dean Edwards"
29 // Android Browser returns percentage for some values,
30 // but width seems to be reliably pixels.
31 // This is against the CSSOM draft spec:
32 // http://dev.w3.org/csswg/cssom/#resolved-values
33 if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
35 // Remember the original values
37 minWidth = style.minWidth;
38 maxWidth = style.maxWidth;
40 // Put in the new values to get a computed value out
41 style.minWidth = style.maxWidth = style.width = ret;
44 // Revert the changed values
46 style.minWidth = minWidth;
47 style.maxWidth = maxWidth;
51 return ret !== undefined ?
53 // IE returns zIndex value as an integer.