code: function isValidCaretPosition(gradients, caretPos, syntax) {
  		syntax = syntax || 'css';
  		if (syntax == 'css' || syntax == 'less' || syntax == 'scss') {
  			return true;
  		}
  
  		var offset = gradients.property.valueRange(true).start;
  		var parts = gradients.gradients;
  
  		// in case of preprocessors where properties are separated with
  		// newlines, make sure there’s no gradient definition past
  		// current caret position. 
  		for (var i = parts.length - 1; i >= 0; i--) {
  			if (parts[i].matchedPart.start + offset >= caretPos) {
  				return false;
  			}
  		}
  
  		return true;
  	}
docs: Validates caret position relatively to located gradients
  in CSS rule. In other words, it checks if it’s safe to
  expand gradients for current caret position or not.
  
  See issue https://github.com/sergeche/emmet-sublime/issues/411
  
  @param  {Array} gradients List of parsed gradients
  @param  {Number} caretPos  Current caret position
  @param  {String} syntax    Current document syntax
  @return {Boolean}