Sha256: 2c2a49d3c76ee59a43ec16de2498362b58b01d919bd128e4bb0ca93d162639b4

Contents?: true

Size: 1.17 KB

Versions: 24

Compression:

Stored size: 1.17 KB

Contents

//>>excludeStart("exclude", pragmas.exclude);
define([
  "shoestring",
  "dom/css/getStyle",
  "dom/css/setStyle"
], function(){
//>>excludeEnd("exclude");// TODO: This code should be consistent with attr().

	/**
	 * Get the compute style property of the first element or set the value of a style property
	 * on all elements in the set.
	 *
	 * @method _setStyle
	 * @param {string} property The property being used to style the element.
	 * @param {string|undefined} value The css value for the style property.
	 * @return {string|shoestring}
	 * @this shoestring
	 */
	shoestring.fn.css = function( property, value ){
		if( !this[0] ){
			return;
		}

		if( typeof property === "object" ) {
			return this.each(function() {
				for( var key in property ) {
					if( property.hasOwnProperty( key ) ) {
						shoestring._setStyle( this, key, property[key] );
					}
				}
			});
		}	else {
			// assignment else retrieve first
			if( value !== undefined ){
				return this.each(function(){
					shoestring._setStyle( this, property, value );
				});
			}

			return shoestring._getStyle( this[0], property );
		}
	};

//>>excludeStart("exclude", pragmas.exclude);
});
//>>excludeEnd("exclude");

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.7 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.6 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.5 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.4 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.3 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.2 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.1 node_modules/shoestring/src/dom/css.js
trusty-cms-4.3.5 node_modules/shoestring/src/dom/css.js
trusty-cms-5.0.0 node_modules/shoestring/src/dom/css.js
trusty-cms-4.3.4 node_modules/shoestring/src/dom/css.js
trusty-cms-4.3.3 node_modules/shoestring/src/dom/css.js
trusty-cms-4.3.2 node_modules/shoestring/src/dom/css.js
trusty-cms-4.3.1 node_modules/shoestring/src/dom/css.js
trusty-cms-4.3 node_modules/shoestring/src/dom/css.js
trusty-cms-4.2.3 node_modules/shoestring/src/dom/css.js
trusty-cms-4.2.2 node_modules/shoestring/src/dom/css.js
trusty-cms-4.2.1 node_modules/shoestring/src/dom/css.js
trusty-cms-4.2 node_modules/shoestring/src/dom/css.js
trusty-cms-4.1.9 node_modules/shoestring/src/dom/css.js