Checks if a given string is a CSS valid number. If it is,
an array containing the value and unit is returned
Parameters
string
$string
Returns
array
—
('unit' if unit is found or '' if no unit exists, number value) or false if no number
merge_selectors()
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.
Parameters
array
$array
Returns
array
discard_invalid_selectors()
discard_invalid_selectors( $array)
Removes invalid selectors and their corresponding rule-sets as
defined by 4.1.7 in REC-CSS2. This is a very rudimentary check
and should be replaced by a full-blown parsing algorithm or
regular expression