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
wrgem-0.0.39 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.38 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.37 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.35 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
railsstrap-3.2.0.2 vendor/assets/bower_components/jquery/src/css/curCSS.js
railsstrap-3.2.0.1 vendor/assets/bower_components/jquery/src/css/curCSS.js
praxis-0.10.1 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
praxis-0.10.0 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
TokiCLI-0.3.0 lib/TokiServer/bower_components/jquery/src/css/curCSS.js
praxis-0.9 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
wrgem-0.0.32 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.31 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.30 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.29 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.28 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.27 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.26 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.25 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.24 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js
wrgem-0.0.23 lib/generators/wrstart/template/vendor/assets/components/jquery/src/css/curCSS.js