| Method Summary |
|
string
|
Removes unnecessary whitespace in ! important
|
|
string
|
Compresses numbers (ie. 1.0 becomes 1 or 1.100 becomes 1.1 )
|
|
string
|
Color compression function. Converts all rgb() values to #-values and uses the short-form if possible. Also replaces 4 color names by #-values.
|
|
array
|
Dissolves properties like padding:10px 10px 10px to padding-top:10px;padding-bottom:10px;...
|
|
array
|
Dissolve background property
|
|
array
|
Explodes a string as explode() does, however, not if $sep is escaped or within a string.
|
|
array
|
Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()
|
|
array
|
Merges all background properties
|
|
array
|
Merges selectors with same properties. Example: a{color:red} b{color:red} -> a,b{color:red} Very basic and has at least one bug. Hopefully there is a replacement soon.
|
|
void
|
Optimises $css after parsing
|
|
string
|
Compresses shorthand values. Example: margin:1px 1px 1px 1px -> margin:1px
|
|
void
|
Optimises shorthands
|
|
void
|
Optimises a sub-value
|
|
void
|
Optimises values
|
| Method Details |
compress_important
| public string compress_important |
( &$string , string $string ) |
Removes unnecessary whitespace in ! important
| Input |
| &$string | |
| string | $string | |
| Output |
| Exception |
|
compress_numbers
| public string compress_numbers |
(string $subvalue ) |
Compresses numbers (ie. 1.0 becomes 1 or 1.100 becomes 1.1 )
| Input |
| string | $subvalue | |
| Output |
| Exception |
|
cut_color
| public string cut_color |
(string $color ) |
Color compression function. Converts all rgb() values to #-values and uses the short-form if possible. Also replaces 4 color names by #-values.
| Input |
| string | $color | |
| Output |
| Exception |
|
dissolve_4value_shorthands
| public array dissolve_4value_shorthands |
(string $property , string $value ) |
Dissolves properties like padding:10px 10px 10px to padding-top:10px;padding-bottom:10px;...
| Input |
| string | $property | |
| string | $value | |
| Output |
| Exception |
|
dissolve_short_bg
| public array dissolve_short_bg |
(string $str_value ) |
Dissolve background property
| Input |
| string | $str_value | |
| Output |
| Exception |
|
explode_ws
| public array explode_ws |
(string $sep , string $string ) |
Explodes a string as explode() does, however, not if $sep is escaped or within a string.
| Input |
| string | $sep | seperator |
| string | $string | |
| Output |
| Exception |
|
merge_4value_shorthands
| public array merge_4value_shorthands |
(array $array ) |
Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()
| Input |
| array | $array | |
| Output |
| Exception |
|
merge_bg
| public array merge_bg |
(array $input_css ) |
Merges all background properties
| Input |
| array | $input_css | |
| Output |
| Exception |
|
merge_selectors
| public array merge_selectors |
( &$array , array $array ) |
Merges selectors with same properties. Example: a{color:red} b{color:red} -> a,b{color:red} Very basic and has at least one bug. Hopefully there is a replacement soon.
| Input |
| &$array | |
| array | $array | |
| Output |
| Exception |
|
postparse
Optimises $css after parsing
|
shorthand
| public string shorthand |
(string $value ) |
Compresses shorthand values. Example: margin:1px 1px 1px 1px -> margin:1px
| Input |
| string | $value | |
| Output |
| Exception |
|
shorthands
| public void shorthands |
() |
Optimises shorthands
|
subvalue
Optimises a sub-value
|
value
Optimises values
|