src/language/CSSUtils.js
function _getSelectorInFinalCSSForm(selectorArray) {
        var finalSelectorArray = [""],
            parentSelectorArray = [],
            group = [];
        _.forEach(selectorArray, function (selector) {
            selector = _stripAtRules(selector);
            group = selector.split(",");
            parentSelectorArray = [];
            _.forEach(group, function (cs) {
                var ampersandIndex = cs.indexOf("&");
                _.forEach(finalSelectorArray, function (ps) {
                    if (ampersandIndex === -1) {
                        cs = _stripAtRules(cs);
                        if (ps.length && cs.length) {
                            ps += " ";
                        }
                        ps += cs;
                    } else {
                        // Replace all instances of & with regexp
                        ps = _stripAtRules(cs.replace(/&/g, ps));
                    }
                    parentSelectorArray.push(ps);
                });
            });
            finalSelectorArray = parentSelectorArray;
        });
        return finalSelectorArray.join(", ");
    }
function _getSelectorInFinalCSSForm(selectorArray) {
        var finalSelectorArray = [""],
            parentSelectorArray = [],
            group = [];
        _.forEach(selectorArray, function (selector) {
            selector = _stripAtRules(selector);
            group = selector.split(",");
            parentSelectorArray = [];
            _.forEach(group, function (cs) {
                var ampersandIndex = cs.indexOf("&");
                _.forEach(finalSelectorArray, function (ps) {
                    if (ampersandIndex === -1) {
                        cs = _stripAtRules(cs);
                        if (ps.length && cs.length) {
                            ps += " ";
                        }
                        ps += cs;
                    } else {
                        // Replace all instances of & with regexp
                        ps = _stripAtRules(cs.replace(/&/g, ps));
                    }
                    parentSelectorArray.push(ps);
                });
            });
            finalSelectorArray = parentSelectorArray;
        });
        return finalSelectorArray.join(", ");
    }
function _getSelectorInFinalCSSForm ( selectorArray ) { var finalSelectorArray = [ "" ] , parentSelectorArray = [ ] , group = [ ] ; _ . forEach ( selectorArray , function ( selector ) { selector = _stripAtRules ( selector ) ; group = selector . split ( "," ) ; parentSelectorArray = [ ] ; _ . forEach ( group , function ( cs ) { var ampersandIndex = cs . indexOf ( "&" ) ; _ . forEach ( finalSelectorArray , function ( ps ) { if ( ampersandIndex === - 1 ) { cs = _stripAtRules ( cs ) ; if ( ps . length && cs . length ) { ps += " " ; } ps += cs ; } else { // Replace all instances of & with regexp ps = _stripAtRules ( cs . replace ( / & / g , ps ) ) ; } parentSelectorArray . push ( ps ) ; } ) ; } ) ; finalSelectorArray = parentSelectorArray ; } ) ; return finalSelectorArray . join ( ", " ) ; }
Converts the given selector array into the actual CSS selectors similar to
those generated by a CSS preprocessor.

@param {Array.<string>} selectorArray
@return {string}
Converts the given selector array into the actual CSS selectors similar to those generated by a CSS preprocessor .