Method |
Description |
|
clamp_number ( $n, $min, $max ) |
|
|
compress_hex_colors ( string $css ) : string |
Utility method to compress hex color values of the form #AABBCC to #ABC or short color name. |
|
do_raise_php_limits ( ) |
Try to configure PHP to use at least the suggested minimum settings |
|
extract_data_urls ( string $css ) : string |
Utility method to replace all data urls with tokens before we start
compressing, to avoid performance issues running some of the subsequent
regexes against large strings chunks. |
|
hsl_to_hex ( $matches ) |
|
|
hue_to_rgb ( $v1, $v2, $vh ) |
* HELPERS
--------------------------------------------------------------------------------------------- |
|
index_of ( string $haystack, string $needle, integer $offset ) : integer |
PHP port of Javascript's "indexOf" function for strings only
Author: Tubal Martin http://blog.margenn.com |
|
lowercase_common_functions ( $matches ) |
|
|
lowercase_common_functions_values ( $matches ) |
|
|
lowercase_directives ( $matches ) |
|
|
lowercase_properties ( $matches ) |
|
|
lowercase_pseudo_elements ( $matches ) |
|
|
lowercase_pseudo_first ( $matches ) |
|
|
minify ( string $css, integer | boolean $linebreak_pos ) : string |
Does bulk of the minification |
|
normalize_int ( mixed $size ) : integer |
Convert strings like "64M" or "30" to int values |
|
preserve_old_IE_specific_matrix_definition ( $matches ) |
|
|
replace_calc ( $matches ) |
|
|
replace_colon ( $matches ) |
|
|
replace_keyframe_zero ( $matches ) |
|
|
replace_string ( $matches ) |
* CALLBACKS
--------------------------------------------------------------------------------------------- |
|
rgb_to_hex ( $matches ) |
|
|
round_number ( $n ) |
|
|
str_slice ( string $str, integer $start, integer | boolean $end = FALSE ) : string |
PHP port of Javascript's "slice" function for strings only
Author: Tubal Martin http://blog.margenn.com
Tests: http://margenn.com/tubal/str_slice/ |
|