Sha256: 415ce1e279751299be3c35359ca6fc935ce0960cfc0ee0f4e67c81400bfb1411

Contents?: true

Size: 1.43 KB

Versions: 148

Compression:

Stored size: 1.43 KB

Contents

define([
	"../core",
	"./var/rnumnonpx",
	"./var/rmargin",
	"./var/getStyles",
	"../selector" // contains
], function( jQuery, rnumnonpx, rmargin, getStyles ) {

function curCSS( elem, name, computed ) {
	var width, minWidth, maxWidth, ret,
		style = elem.style;

	computed = computed || getStyles( elem );

	// Support: IE9
	// getPropertyValue is only needed for .css('filter') in IE9, see #12537
	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 ) ) {

			// 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
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}

return curCSS;
});

Version data entries

148 entries across 148 versions & 13 rubygems

Version Path
kms-0.9.0 vendor/assets/bower_components/jquery/src/css/curCSS.js
kms-0.8.0 vendor/assets/bower_components/jquery/src/css/curCSS.js
TokiCLI-0.3.1 lib/TokiServer/bower_components/jquery/src/css/curCSS.js
kms-0.7.0 vendor/assets/bower_components/jquery/src/css/curCSS.js
kms-0.6.0 vendor/assets/bower_components/jquery/src/css/curCSS.js
kms-0.5.0 vendor/assets/bower_components/jquery/src/css/curCSS.js
kms-0.4.2 vendor/assets/bower_components/jquery/src/css/curCSS.js
wrgem-0.0.55 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.1.5 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.1.4 vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.54 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
praxis-0.19.0 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
wrgem-0.0.53 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.52 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.51 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
praxis-0.18.1 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
praxis-0.18.0 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
praxis-0.17.1 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
praxis-0.17.0 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
praxis-0.16.1 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js