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
dune-dashboard-1.0.7 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.0.6 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.0.5 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.0.4 vendor/assets/components/jquery/src/css/curCSS.js
agile-proxy-0.1.20 assets/ui/bower_components/jquery/src/css/curCSS.js
agile-proxy-0.1.19 assets/ui/bower_components/jquery/src/css/curCSS.js
dune-dashboard-1.0.3 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.0.2 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.0.1 vendor/assets/components/jquery/src/css/curCSS.js
dune-dashboard-1.0.0 vendor/assets/components/jquery/src/css/curCSS.js
praxis-0.13.0 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
agile-proxy-0.1.18 assets/ui/bower_components/jquery/src/css/curCSS.js
agile-proxy-0.1.13 assets/ui/bower_components/jquery/src/css/curCSS.js
praxis-0.11.2 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
hyhyhy-1.0.0 lib/hyhyhy/structure/_includes/jquery/src/css/curCSS.js
praxis-0.11.1 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
praxis-0.11 lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
agile-proxy-0.1.12 assets/ui/bower_components/jquery/src/css/curCSS.js
praxis-0.11pre lib/api_browser/app/bower_components/jquery/src/css/curCSS.js
hyhyhy-0.0.9 lib/hyhyhy/structure/_includes/jquery/src/css/curCSS.js