CSS

CSS minifier. Please report bugs on https://github.com/matthiasmullie/minify/issues
extends MatthiasMullie\Minify\Minify
Methods Summary
public
# setMaxImportSize( int $size )
Set the maximum size if files to be imported. Files larger than this size (in kB) will not be imported into the CSS. Importing files into the CSS as data-uri will save you some connections, but we should only import relatively small decorative images so that our CSS file doesn't get too bulky.
public
# setImportExtensions( array $extensions )
Set the type of extensions to be imported into the CSS (to save network connections). Keys of the array should be the file extensions & respective values should be the data type.
protected
# moveImportsToTop( string $content )
Move any import statements to the top.
protected
# combineImports( string $source , string $content , string[] $parents )
Combine CSS from import statements.

import


protected
# importFiles( string $source , string $content )
Import files into the CSS, base64-ized.

url


public
# execute( string $path = NULL, string[] $parents = array ( ) )
Minify the data. Perform CSS optimizations.
protected
# move( MatthiasMullie\PathConverter\Converter $converter , string $content )
Moving a css file should update all relative urls. Relative references (e.g. ../images/image.gif) in a certain css file, will have to be updated when a file is being saved at another location (e.g. ../../images/image.gif, if the new CSS file is 1 folder deeper).
protected
# shortenHex( string $content )
Shorthand hex color codes. #FF0000 -> #F00.
protected
# shortenFontWeights( string $content )
Shorten CSS font weights.
protected
# shortenZeroes( string $content )
Shorthand 0 values to plain 0, instead of e.g. -0em.
protected
# stripEmptyTags( string $content )
Strip comments from source code.
protected
# stripComments( )
Strip comments from source code.
protected
# stripWhitespace( string $content )
Strip whitespace.
protected
# canImportBySize( string $path )
Check if file is small enough to be imported.
Methods inherited from MatthiasMullie\Minify\Minify
__construct(), add(), minify(), gzip(), cache(), execute(), load(), save(), registerPattern(), replace(), replacePattern(), extractStrings(), restoreExtractedData(), canImportFile(), openFileForWriting(), writeToFile()
Properties Summary
protected int $maxImportSize




# 5
protected string[] $importExtensions




# array ( 'gif' => 'data:image/gif', 'png' => 'data:image/png', 'jpe' => 'data:image/jpeg', 'jpg' => 'data:image/jpeg', 'jpeg' => 'data:image/jpeg', 'svg' => 'data:image/svg+xml', 'woff' => 'data:application/x-font-woff', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'xbm' => 'image/x-xbitmap', )
Properties inherited from MatthiasMullie\Minify\Minify
$data, $patterns, $extracted