Sha256: a3bf22eb0c66288beb5987e4bad2f521fda78d8e73abe4d0a9bcc1fa9ee526ca

Contents?: true

Size: 1.62 KB

Versions: 40

Compression:

Stored size: 1.62 KB

Contents

define( [
	"../core",
	"../core/isAttached",
	"./var/rboxStyle",
	"./var/rnumnonpx",
	"./var/getStyles",
	"./support"
], function( jQuery, isAttached, rboxStyle, rnumnonpx, 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 === "" && !isAttached( 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.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.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

40 entries across 32 versions & 6 rubygems

Version Path
trusty-cms-6.3.1 node_modules/jquery-ujs/node_modules/jquery/src/css/curCSS.js
trusty-cms-6.3.1 node_modules/jquery-treetable/node_modules/jquery/src/css/curCSS.js
optimacms-0.1.61 spec/dummy/node_modules/jquery-ujs/node_modules/jquery/src/css/curCSS.js
optimacms-0.1.61 spec/dummy/node_modules/cocoon-js/node_modules/jquery/src/css/curCSS.js
udt-itf-theme-0.1.0 _sass/node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.7 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.6 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.5 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.4 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.3 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.2 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.1 node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.5 node_modules/jquery/src/css/curCSS.js
trusty-cms-5.0.0 node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.4 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.4 node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.3 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.3 node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.2 spec/dummy/node_modules/jquery/src/css/curCSS.js
trusty-cms-4.3.2 node_modules/jquery/src/css/curCSS.js