Combines (and compresses) Theme (Medium).
@access		public
@param		string		$styleFile		File Name of main Theme Style File (iE. style.css,import.css,default.css)
@param		bool		$compress		Flag: compress combined File
778012
public function minimize( $styleFile, $compress = FALSE )
	{
		$pathName	= $this->getPath();												//  get full Path to Style File

		//  --  SET COMBINER ENVIRONMENT  --  //
		$this->combiner->setPrefix( $this->combinerPrefix );						//  set Combiner Prefix
		$this->combiner->setPrefix( $this->combinerSuffix );						//  set Combiner Suffix

		//  --  LAUNCH COMBINER  --  //
		$fileUri	= $this->combiner->combineFile( $pathName.$styleFile );			//  combine CSS Files
		$this->statistics	= $this->combiner->getStatistics();						//  collect Statisticts

		if( $compress )																//  Compression is enabled
		{
			//  --  SET COMPRESSOR ENVIRONMENT  --  //
			$this->compressor->setPrefix( $this->compressorPrefix );				//  set Compressor Prefix
			$this->compressor->setPrefix( $this->compressorSuffix );				//  set Compressor Suffix

			//  --  LAUNCH COMPRESSOR  --  //
			$targetFile	= $this->compressor->compressFile( $fileUri );				//  compress CSS File
			$statistics	= $this->compressor->getStatistics();						//  collect Statisticts
			$this->statistics['sizeCompressed']	= $statistics['after'];				//  merge Statisticts
			$this->statistics['fileCompressed']	= realpath( $targetFile );			//  note compressed Target File Path
		}
		$this->statistics['fileSource']		= realpath( $pathName.$styleFile );		//  note Source File Path
		$this->statistics['fileCombined']	= realpath( $fileUri );					//  note combined Target File Path
		return TRUE;
	}
902510
public function validateCSSFile($sourceFile, $originFile)
	{
		$sourceFileContents = (string) file_get_contents($this->sourcePath . '/' . $sourceFile);
		$originFileContents = (string) file_get_contents($this->originPath . '/' . $originFile);

		$sourceRules = $this->getCSSRules($sourceFile, $sourceFileContents);
		$originRules = $this->getCSSRules($originFile, $originFileContents);

		$missingRules = array_diff(array_keys($sourceRules), array_keys($originRules));
		$additionalRules = array_diff(array_keys($originRules), array_keys($sourceRules));
		if (!empty($missingRules))
		{
			$this->output->addMessage(Output::FATAL, 'Stylesheet file is missing CSS rules: ' . implode(', ', $missingRules), $originFile);
		}
		if (!empty($additionalRules))
		{
			$this->output->addMessage(Output::FATAL, 'Stylesheet file has additional CSS rules: ' . implode(', ', $additionalRules), $originFile);
		}
	}
1224390
public static function overload($envFile = ".env")
    {
        self::getLoader()->overloader = true;
        self::getLoader()->innerLoad($envFile);
    }
891607
public static function image($mixSize = '400x350', $background = '000', $foregroundColor = 'fff', $text = null, $format = 'jpg')
    {
        return "//dummyimage.com/$mixSize/$background/$foregroundColor" . (!$text ? : '&text=' . urlencode($text));
    }
278385
public function get($css = null, $compress = true)
    {
        if (null === $css) {
            foreach ((array) $this->_list as $src) {
                if (!file_exists($src)) {
                    continue;
                }

                $css .= file_get_contents($src);
            }
        }

        $this->_list = [];

        return $compress ? $this->parse($css) : $css;
    }
642835
private function minify($files, $outputFile, array $minifiers)
    {
        $content = $this->merge($files, $minifiers);

        foreach ($minifiers as $minifier) {
            $content = $minifier->minify($content);
        }

        file_put_contents($this->basePath . $outputFile, $content);
    }
1236678
def process_styles (out)
      out.gsub /(<style\b[^>]*?>([\s\S]*?)<\/style>)\s*/i do
        css = $2
        m = $1.gsub /^<style\s([^>]+)>/i do |m|
          attrs(m, 'style', true)
        end
        begin
          css_compressed = MultiCss.min css
          m.gsub!(css, css_compressed)
        rescue Exception => e
          log e.message
        end
        reserve m
      end
    end
1138397
public function enqueueStyles($styles)
    {
        // Check styles
        if (empty($styles)) {
            return;
        }

        $defaults = [
            'src'   => false,
            'deps'  => [],
            'ver'   => false,
            'media' => 'all'
        ];

        // Iterate on all
        foreach ($styles as $handle => $opts) {
            if (!is_array($opts)) {
                continue;
            }

            // Merge options with defaults and enqueue style
            $opts = array_merge($defaults, $opts);
            wp_enqueue_style($handle, $opts['src'], $opts['deps'], $opts['ver'], $opts['media']);
        }
    }
1082432
function compress() {
  return through.obj(function(file, enc, cb) {
    new CleanCSS().minify(file.contents, function (err, minified) {
      file.contents = new Buffer(minified.styles);
      cb(err, file);
    });
  });
}
601382
protected function hashedCombinedFilename($combinedFile, $fileList)
    {
        $name = pathinfo($combinedFile, PATHINFO_FILENAME);
        $hash = $this->hashOfFiles($fileList);
        $extension = File::get_file_extension($combinedFile);
        return $name . '-' . substr($hash, 0, 7) . '.' . $extension;
    }
934563
private function appendStyles(array $styles)
    {
        if (empty($styles)) {
            return;
        }

        $string = '';
        $prependSemicolon = false;
        foreach ($styles as $key => $value) {
            if ($prependSemicolon) {
                $string .= '; ';
            }
            $prependSemicolon = true;
            $string .= $key.': '.$value;
        }

        $this->appendAttribute('style', $string);
    }
637742
function kmcCss(cssFile,cssContent,combinedJSFile){
	console.log(combinedJSFile);
	var jsContent = fs.readFileSync(combinedJSFile,{encoding:'utf8'});
	// TODO:把jsContent里的requires里的对css的引用删除只剩下一个

}
813400
protected static function addMap($mapfile)
    {
        if (! in_array($mapfile, self::$maps)) {
            // keep track of specific map file loaded in this
            // instance so we can update it if necessary
            self::$mapfile = $mapfile;

            if (file_exists($mapfile)) {
                $map = include $mapfile;
                if (is_array($map)) {
                    // mapfile contains a valid map, so we'll keep it
                    self::$maps[] = $mapfile;
                    self::$map = array_merge(self::$map, $map);
                }
            }
        }
    }
1235262
private function _assembleCSS($pValue = array())
	{
		$pairs = array();
		foreach ($pValue as $property => $value) {
			$pairs[] = $property . ':' . $value;
		}
		$string = implode('; ', $pairs);

		return $string;
	}
1333181
public function setStyle(array $style = [], $update = true)
    {
        $this->style = $update
            ? array_merge($this->style, $style)
            : $style;

        return $this;
    }
643288
public function importStyleSheet(string $filepath, string $type = 'text/css', bool $cacheBust = false): bool
    {
        if(!is_file($filepath)) {
            trigger_error('file "'.$filepath.'" failed for import, ressource not found or not a file', E_USER_NOTICE);

            return false;
        }
        if(!is_readable($filepath)) {
            trigger_error('file "'.$filepath.'" failed for import, ressource is not readable', E_USER_NOTICE);

            return false;
        }

        if($cacheBust)
            $filepath = self::cacheBust($filepath);
        $this->addStyle(self::_getIncludeContents($filepath), $type);

        return true;
    }
523199
public static function addSystemStylesheet($stylesheet, $dir = 'css')
	{
		if ($dir != 'css')
		{
			$stylesheet = $dir . '/' . $stylesheet;
		}

		$asset = new Stylesheet('system', $stylesheet);

		if ($asset->exists())
		{
			if ($document = self::app('document'))
			{
				$document->addStyleSheet($asset->link());
			}
		}
	}