Leafo\ScssPhp\Compiler::multiplySelectors PHP Method

multiplySelectors() protected method

Find the final set of selectors
protected multiplySelectors ( Leafo\ScssPhp\Compiler\Environment $env ) : array
$env Leafo\ScssPhp\Compiler\Environment
return array
    protected function multiplySelectors(Environment $env)
    {
        $envs = $this->compactEnv($env);
        $selectors = [];
        $parentSelectors = [[]];
        while ($env = array_pop($envs)) {
            if (empty($env->selectors)) {
                continue;
            }
            $selectors = [];
            foreach ($env->selectors as $selector) {
                foreach ($parentSelectors as $parent) {
                    $selectors[] = $this->joinSelectors($parent, $selector);
                }
            }
            $parentSelectors = $selectors;
        }
        return $selectors;
    }
Compiler