lib/editTree/css.js
function(css, pos) {
			var cssProp = null;
			/** @type EditContainer */
			var cssRule = typeof css === 'string' ? this.parseFromPosition(css, pos, true) : css;
			if (cssRule) {
				cssProp = cssRule.itemFromPosition(pos, true);
				if (!cssProp) {
					// in case user just started writing CSS property
					// and didn't include semicolon–try another approach
					cssProp = utils.find(cssRule.list(), function(elem) {
						return elem.range(true).end == pos;
					});
				}
			}

			return cssProp;
		}
function(css, pos) {
			var cssProp = null;
			/** @type EditContainer */
			var cssRule = typeof css === 'string' ? this.parseFromPosition(css, pos, true) : css;
			if (cssRule) {
				cssProp = cssRule.itemFromPosition(pos, true);
				if (!cssProp) {
					// in case user just started writing CSS property
					// and didn't include semicolon–try another approach
					cssProp = utils.find(cssRule.list(), function(elem) {
						return elem.range(true).end == pos;
					});
				}
			}

			return cssProp;
		}
function ( css , pos ) { var cssProp = null ; /** @type EditContainer */ var cssRule = typeof css === 'string' ? this . parseFromPosition ( css , pos , true ) : css ; if ( cssRule ) { cssProp = cssRule . itemFromPosition ( pos , true ) ; if ( ! cssProp ) { // in case user just started writing CSS property // and didn't include semicolon–try another approach cssProp = utils . find ( cssRule . list ( ) , function ( elem ) { return elem . range ( true ) . end == pos ; } ) ; } } return cssProp ; }
Locates CSS property in given CSS code fragment under specified character position
@param  {String} css CSS code or parsed CSSEditContainer
@param  {Number} pos Character position where to search CSS property
@return {CSSEditElement}
Locates CSS property in given CSS code fragment under specified character position