Custom less.php parse function for finding simple name-value css pairs
ex: width:100px;
501237
private function parseNameValue(){

		$index = $this->pos;
		$this->save();


		//$match = $this->MatchReg('/\\G([a-zA-Z\-]+)\s*:\s*((?:\'")?[a-zA-Z0-9\-% \.,!]+?(?:\'")?)\s*([;}])/');
		$match = $this->MatchReg('/\\G([a-zA-Z\-]+)\s*:\s*([\'"]?[#a-zA-Z0-9\-%\.,]+?[\'"]?) *(! *important)?\s*([;}])/');
		if( $match ){

			if( $match[4] == '}' ){
				$this->pos = $index + strlen($match[0])-1;
			}

			if( $match[3] ){
				$match[2] .= ' !important';
			}

			return $this->NewObj4('Less_Tree_NameValue',array( $match[1], $match[2], $index, $this->env->currentFileInfo));
		}

		$this->restore();
	}
756014
function ( target ) {
        var result = {},
            val = String( target );

        if ( val && val.indexOf('(') > -1 ) {
            result = {value: $B.string.trim(val), unit: ''};
        } else {
            val.replace( this.REG_CSS_VALUE, function (str, v, u) {
                result = {value: $B.string.trim(v), unit: u || ''};
            });
        }
        return result;
    }
600
function getColorLightenFunction(less) {

  function rgba() {
    var rgbaFunc = less.functions.functionRegistry.get("rgba");
    return rgbaFunc.apply(null, arguments);
  }

  return function (color, amount) {
    var baseRGB = [255, 255, 255];
    var value = amount.value / 100;

    if (value < 0) {
      baseRGB = [0, 0, 0];
      value = -1 * value;
    }

    return rgba(
      Math.round((baseRGB[0] - color.rgb[0]) * value) + color.rgb[0],
      Math.round((baseRGB[1] - color.rgb[1]) * value) + color.rgb[1],
      Math.round((baseRGB[2] - color.rgb[2]) * value) + color.rgb[2],
      color.alpha
    );
  };
}
632835
function getCSSText(className) {
			if (typeof document.styleSheets != "object") return "";
			if (document.styleSheets.length <= 0) return "";
			var classes = document.styleSheets[0].rules || document.styleSheets[0].cssRules;
			for (var x = 0; x < classes.length; x++) {
				if (classes[x].selectorText == "." + className || classes[x].selectorText == "#" + className) {
					return ((classes[x].cssText) ? (classes[x].cssText) : (classes[x].style.cssText));
				}
			}
			return "";
		}
929548
function parseStyles(s) {
  var parser = new parserlib.css.Parser();
  var result = { property: Object.create(null), priority: Object.create(null) };
  parser.addListener("property", function(e) {
    if (e.invalid) return; // Skip errors
    result.property[e.property.text] = e.value.text;
    if (e.important) result.priority[e.property.text] = 'important';
  });
  s = (''+s).replace(/^;/, '');
  parser.parseStyleAttribute(s);
  return result;
}
375037
function title(title, widths, opt){
  var wid = title.length;
  var total = widths.reduce((a, b) => a + b + 3, 0) - 1;
  var left = parseInt((total - wid) / 2);
  if (!opt.plain) title = '\u001b[1m' + title + '\u001b[22m';
  log(p[0][0] + widths.map(col => p.h + strN(col, p.h) + p.h).join(p.h) + p[0][2]);
  log(p.v + widths.map(col => ' ' + strN(col, ' ') + ' ').join(' ') + p.v);
  log(p.v + strN(left) + title + strN(total - left - wid) + p.v);
  log(p.v + widths.map(col => ' ' + strN(col, ' ') + ' ').join(' ') + p.v);
}
488504
function getReflectedCSSName(name) {
		name = cssEditTree.baseName(name);
		var vendorPrefix = '^(?:\\-\\w+\\-)?', m;
		
		if ((name == 'opacity' || name == 'filter') && prefs.get('css.reflect.oldIEOpacity')) {
			return new RegExp(vendorPrefix + '(?:opacity|filter)$');
		} else if ((m = name.match(/^border-radius-(top|bottom)(left|right)/))) {
			// Mozilla-style border radius
			return new RegExp(vendorPrefix + '(?:' + name + '|border-' + m[1] + '-' + m[2] + '-radius)$');
		} else if ((m = name.match(/^border-(top|bottom)-(left|right)-radius/))) { 
			return new RegExp(vendorPrefix + '(?:' + name + '|border-radius-' + m[1] + m[2] + ')$');
		}
		
		return new RegExp(vendorPrefix + name + '$');
	}
466063
function (value) {
    
            var process = value.split('-');
            value = beyond.css.values;
            for (var i in process) {
    
                value = value[process[i]];
                if (typeof value === 'undefined') return;
    
            }
    
            return value;
    
        }
215271
public static function getCSSClassname($size, $value, $suffix, $min = 1, $max = 12) {

        if ($value < $min || $max < $value) {
            return null;
        }

        $sizes    = ["lg", "md", "sm", "xs"];
        $suffixes = ["offset", "pull", "push", ""];

        if (false === in_array($size, $sizes) || false === in_array($suffix, $suffixes)) {
            return null;
        }
        if ("" !== $suffix) {
            $suffix .= "-";
        }

        return implode("-", ["col", $size, $suffix . $value]);
    }
464790
function css(key, val) {
  var style, props;
  if(!this.length) {
    return this;
  }

  if(key && typeof key === 'object') {
    props = key;
  }else if(key && val) {
    props = {};
    props[key] = val;
  }

  // get style object
  if(key === undefined) {
    style = window.getComputedStyle(this.dom[0], null);
    // TODO: convert to plain object map?
    // for the moment return CSSStyleDeclaration
    return style;
  // get single style property value
  }else if(typeof key === 'string' && !val) {
    style = window.getComputedStyle(this.dom[0], null);
    return style.getPropertyValue(key);
  }

  // set inline styles
  this.each(function(el) {
    el.style = el.style;
    for(var z in props) {
      el.style[z] = '' + props[z];
    }
  });
  return this;
}
1014942
def lessc(responsive=False):
    
    local('lessc {0}/static/css/bootstrap.less'
          ' {0}/static/css/bootstrap.css'.format(settings.PROJECT_NAME))
    if responsive:
        local('lessc {0}/static/css/responsive.less'
              ' {0}/static/css/bootstrap-responsive.css'.format(
                  settings.PROJECT_NAME))
489842
function(req, res, next) {
        var parsed = require("url").parse(req.url);
        if (parsed.pathname.match(/\.less$/)) {
            return less(parsed.pathname).then(function(o) {
                res.setHeader("Content-Type", "text/css");
                res.end(o.css);
            });
        }
        next();
    }
274618
function generateShortName (name, filename, css) {
  // first occurrence of the name
  // TODO: better match with regex
  var i = css.indexOf('.' + name);
  var numLines = css.substr(0, i).split(/[\r\n]/).length;

  var hash = stringHash(css).toString(36).substr(0, 5);
  return '_' + name + '_' + hash + '_' + numLines;
}
1252089
function(value, property) {
			property = (property || '').toLowerCase();
			var unitlessProps = prefs.getArray('css.unitlessProperties');
			return value.replace(/^(\-?[0-9\.]+)([a-z]*)$/, function(str, val, unit) {
				if (!unit && (val == '0' || ~unitlessProps.indexOf(property)))
					return val;
				
				if (!unit)
					return val.replace(/\.$/, '') + prefs.get(~val.indexOf('.') ? 'css.floatUnit' : 'css.intUnit');
				
				return val + getUnit(unit);
			});
		}
629665
function parseCSSSelector(selector) {
    const match = SELECTOR_RE.exec(selector);
    if (!match) {
        throw new Error("Unsupported or invalid CSS selector: " + selector);
    }
    const res = { nodeName: match[1].trim() };
    if (match[2]) {
        const attr = [match[2]];
        if (match[3]) { attr.push(match[3]); }
        // Decode the attribute value
        if(match[4]) {
            attr.push(match[4].replace(/\\([nrtf"\\])/g, function(_, k) {
                return valueDecodeTable[k];
            }));
        }
        res.attributes = [attr];
    }
    return res;
}
1125395
function( styleText, nativeNormalize ) {
			var props = [],
				name,
				parsedProps = CKEDITOR.tools.parseCssText( styleText, true, nativeNormalize );

			for ( name in parsedProps )
				props.push( name + ':' + parsedProps[ name ] );

			props.sort();

			return props.length ? ( props.join( ';' ) + ';' ) : '';
		}
655270
function parseStyleAttribute(element) {
    var oStyle = { },
        style = element.getAttribute('style');
    if (style) {
      if (typeof style == 'string') {
        style = style.replace(/;$/, '').split(';').forEach(function (current) {
            var attr = current.split(':');
            oStyle[normalizeAttr(attr[0].trim().toLowerCase())] = attr[1].trim();
        });
      } else {
        for (var prop in style) {
          if (typeof style[prop] !== 'undefined') {
            oStyle[normalizeAttr(prop.toLowerCase())] = style[prop];
          }
        }
      }
    }
    return oStyle;
  }