index.js
function consumeValue(stream) {
	const values = new CSSValue();
	let value;

	while (!stream.eof()) {
		// use colon as value separator
		stream.eat(COLON);
		if (value = consumeNumericValue(stream) || consumeColor(stream)) {
			// edge case: a dash after unit-less numeric value or color should
			// be treated as value separator, not negative sign
			if (!value.unit) {
				stream.eat(DASH);
			}
		} else {
			stream.eat(DASH);
			value = consumeKeyword(stream, true);
		}

		if (!value) {
			break;
		}

		values.add(value);
	}

	return values;
}
function consumeValue(stream) {
	const values = new CSSValue();
	let value;

	while (!stream.eof()) {
		// use colon as value separator
		stream.eat(COLON);
		if (value = consumeNumericValue(stream) || consumeColor(stream)) {
			// edge case: a dash after unit-less numeric value or color should
			// be treated as value separator, not negative sign
			if (!value.unit) {
				stream.eat(DASH);
			}
		} else {
			stream.eat(DASH);
			value = consumeKeyword(stream, true);
		}

		if (!value) {
			break;
		}

		values.add(value);
	}

	return values;
}
function consumeValue ( stream ) { const values = new CSSValue ( ) ; let value ; while ( ! stream . eof ( ) ) { // use colon as value separator stream . eat ( COLON ) ; if ( value = consumeNumericValue ( stream ) || consumeColor ( stream ) ) { // edge case: a dash after unit-less numeric value or color should // be treated as value separator, not negative sign if ( ! value . unit ) { stream . eat ( DASH ) ; } } else { stream . eat ( DASH ) ; value = consumeKeyword ( stream , true ) ; } if ( ! value ) { break ; } values . add ( value ) ; } return values ; }
Consumes embedded value from Emmet CSS abbreviation stream
@param  {StreamReader} stream
@return {CSSValue}
Consumes embedded value from Emmet CSS abbreviation stream