Sha256: 6d2181d431afabdebda68bd51b72a1f2ce36ffb4a78c7c051fda5a020ef10b17

Contents?: true

Size: 1.64 KB

Versions: 71

Compression:

Stored size: 1.64 KB

Contents

define( [
	"../core",
	"./var/rnumnonpx",
	"./var/rmargin",
	"./var/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 );

	// getPropertyValue is needed for:
	//   .css('filter') (IE 9 only, #12537)
	//   .css('--customProperty) (#3144)
	if ( computed ) {
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
			ret = jQuery.style( elem, name );
		}

		// A tribute to the "awesome hack by Dean Edwards"
		// 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;

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

return curCSS;
} );

Version data entries

71 entries across 61 versions & 10 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/jquery/src/css/curCSS.js
columbus3-0.5.1 bower_components/jquery/src/css/curCSS.js
trusty-cms-3.6.0 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.6.0 node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.5 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.5 node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.4 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.4 node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.3 node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.3 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.2 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.2 node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.1 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.1 node_modules/jquery/src/css/curCSS.js
optimacms-0.4.3 spec/dummy/node_modules/jquery/src/css/curCSS.js
optimacms-0.4.2 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.0 node_modules/jquery/src/css/curCSS.js
trusty-cms-3.5.0 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.4.0 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-3.4.0 node_modules/jquery/src/css/curCSS.js