function toggleCSSComment(editor) {
		/** @type Range */
		var range = require('range').create(editor.getSelectionRange());
		var info = require('editorUtils').outputInfo(editor);
			
		if (!range.length()) {
			// no selection, try to get current rule
			/** @type CSSRule */
			var rule = require('cssEditTree').parseFromPosition(info.content, editor.getCaretPos());
			if (rule) {
				var property = cssItemFromPosition(rule, editor.getCaretPos());
				range = property 
					? property.range(true) 
					: require('range').create(rule.nameRange(true).start, rule.source);
			}
		}
		
		if (!range.length()) {
			// still no selection, get current line
			range = require('range').create(editor.getCurrentLineRange());
			require('utils').narrowToNonSpace(info.content, range);
		}
		
		return genericCommentToggle(editor, '/*', '*/', range);
	}
function toggleCSSComment(editor) {
		
		var range = require('range').create(editor.getSelectionRange());
		var info = require('editorUtils').outputInfo(editor);
			
		if (!range.length()) {
			
			
			var rule = require('cssEditTree').parseFromPosition(info.content, editor.getCaretPos());
			if (rule) {
				var property = cssItemFromPosition(rule, editor.getCaretPos());
				range = property 
					? property.range(true) 
					: require('range').create(rule.nameRange(true).start, rule.source);
			}
		}
		
		if (!range.length()) {
			
			range = require('range').create(editor.getCurrentLineRange());
			require('utils').narrowToNonSpace(info.content, range);
		}
		
		return genericCommentToggle(editor, '', range);
	}
function toggleCSSComment ( editor ) { /** @type Range */ var range = require ( 'range' ) . create ( editor . getSelectionRange ( ) ) ; var info = require ( 'editorUtils' ) . outputInfo ( editor ) ; if ( ! range . length ( ) ) { // no selection, try to get current rule /** @type CSSRule */ var rule = require ( 'cssEditTree' ) . parseFromPosition ( info . content , editor . getCaretPos ( ) ) ; if ( rule ) { var property = cssItemFromPosition ( rule , editor . getCaretPos ( ) ) ; range = property ? property . range ( true ) : require ( 'range' ) . create ( rule . nameRange ( true ) . start , rule . source ) ; } } if ( ! range . length ( ) ) { // still no selection, get current line range = require ( 'range' ) . create ( editor . getCurrentLineRange ( ) ) ; require ( 'utils' ) . narrowToNonSpace ( info . content , range ) ; } return genericCommentToggle ( editor , '/*' , '*/' , range ) ; }
Simple CSS commenting
@param {IEmmetEditor} editor
@return {Boolean} Returns <code>true</code> if comment was toggled
Simple CSS commenting