lib/resolver/css.js
function(abbr, syntax) {
			syntax = syntax || 'css';
			
			var i = 0, il = abbr.length, value = '', ch;
			while (i < il) {
				ch = abbr.charAt(i);
				if (isNumeric(ch) || ch == '#' || ch == '$' || (ch == '-' && isNumeric(abbr.charAt(i + 1)))) {
					value = abbr.substring(i);
					break;
				}
				
				i++;
			}
			
			// try to find keywords in abbreviation
			var property = abbr.substring(0, abbr.length - value.length);
			var keywords = [];
			// try to extract some commonly-used properties
			while (~property.indexOf('-') && !resources.findSnippet(syntax, property)) {
				var parts = property.split('-');
				var lastPart = parts.pop();
				if (!isValidKeyword(lastPart)) {
					break;
				}
				
				keywords.unshift(lastPart);
				property = parts.join('-');
			}

			return keywords.join('-') + value;
		}
function(abbr, syntax) {
			syntax = syntax || 'css';
			
			var i = 0, il = abbr.length, value = '', ch;
			while (i < il) {
				ch = abbr.charAt(i);
				if (isNumeric(ch) || ch == '#' || ch == '$' || (ch == '-' && isNumeric(abbr.charAt(i + 1)))) {
					value = abbr.substring(i);
					break;
				}
				
				i++;
			}
			
			// try to find keywords in abbreviation
			var property = abbr.substring(0, abbr.length - value.length);
			var keywords = [];
			// try to extract some commonly-used properties
			while (~property.indexOf('-') && !resources.findSnippet(syntax, property)) {
				var parts = property.split('-');
				var lastPart = parts.pop();
				if (!isValidKeyword(lastPart)) {
					break;
				}
				
				keywords.unshift(lastPart);
				property = parts.join('-');
			}

			return keywords.join('-') + value;
		}
function ( abbr , syntax ) { syntax = syntax || 'css' ; var i = 0 , il = abbr . length , value = '' , ch ; while ( i < il ) { ch = abbr . charAt ( i ) ; if ( isNumeric ( ch ) || ch == '#' || ch == '$' || ( ch == '-' && isNumeric ( abbr . charAt ( i + 1 ) ) ) ) { value = abbr . substring ( i ) ; break ; } i ++ ; } // try to find keywords in abbreviation var property = abbr . substring ( 0 , abbr . length - value . length ) ; var keywords = [ ] ; // try to extract some commonly-used properties while ( ~ property . indexOf ( '-' ) && ! resources . findSnippet ( syntax , property ) ) { var parts = property . split ( '-' ) ; var lastPart = parts . pop ( ) ; if ( ! isValidKeyword ( lastPart ) ) { break ; } keywords . unshift ( lastPart ) ; property = parts . join ( '-' ) ; } return keywords . join ( '-' ) + value ; }
Search for value substring in abbreviation
@param {String} abbr
@returns {String} Value substring
Search for value substring in abbreviation