Procedural File: functions.inc.php
Source Location: /functions.inc.php
Page Details:
Various functions
This file contains a few functions which are needed to optimise CSS Code. These functions are not part of the main class since they are not directly related to the parsing process.
Tags:
compress_numbers [line 79]
string compress_numbers(
string &$subvalue)
|
|
Compresses numbers (ie. 1.0 becomes 1 or 1.100 becomes 1.1 )
Tags:
Parameters
cut_color [line 20]
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.
Tags:
Parameters
dissolve_4value_shorthands [line 120]
array dissolve_4value_shorthands(
string $property, string $value)
|
|
Dissolves properties like padding:10px 10px 10px to padding-top:10px;padding-bottom:10px;...
Tags:
Parameters
| string |
$property |
|
| string |
$value |
|
dissolve_short_bg [line 276]
array dissolve_short_bg(
string $str_value)
|
|
Dissolve background property, CSS3 will be compliant
Tags:
Parameters
explode_ws [line 178]
array explode_ws(
string $sep, string $string)
|
|
Explodes a string as explode() does, however, not if $sep is escaped or within a string
Tags:
Parameters
| string |
$sep |
seperator |
| string |
$string |
|
merge_4value_shorthands [line 233]
array merge_4value_shorthands(
array $array)
|
|
Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()
Tags:
Parameters
merge_bg [line 362]
array merge_bg(
array $input_css)
|
|
Merges all background properties
Tags:
Parameters
|