vendor/emmet.js
function getRangeForPrevItemInCSS(rule, offset, selRange) {
		var tree = require('cssEditTree').parse(rule, {
			offset: offset
		});
		
		var curRange = matchedRangeForCSSProperty(tree, selRange, true);
		
		if (!curRange) {
			// no matched property, try to match selector
			var range = tree.nameRange(true);
			if (selRange.start > range.start) {
				return range;
			}
		}
		
		return curRange;
	}
function getRangeForPrevItemInCSS(rule, offset, selRange) {
		var tree = require('cssEditTree').parse(rule, {
			offset: offset
		});
		
		var curRange = matchedRangeForCSSProperty(tree, selRange, true);
		
		if (!curRange) {
			// no matched property, try to match selector
			var range = tree.nameRange(true);
			if (selRange.start > range.start) {
				return range;
			}
		}
		
		return curRange;
	}
function getRangeForPrevItemInCSS ( rule , offset , selRange ) { var tree = require ( 'cssEditTree' ) . parse ( rule , { offset : offset } ) ; var curRange = matchedRangeForCSSProperty ( tree , selRange , true ) ; if ( ! curRange ) { // no matched property, try to match selector var range = tree . nameRange ( true ) ; if ( selRange . start > range . start ) { return range ; } } return curRange ; }
Returns range for item to be selected in CSS before current caret
(selection) position
@param {String} rule CSS rule declaration
@param {Number} offset Rule's position index inside content
@param {Range} selRange Selection range
@return {Range} Returns range if previous item was found, <code>null</code> otherwise
Returns range for item to be selected in CSS before current caret ( selection ) position