Docs For Class csstidy_optimise

csstidy

# Class: csstidy_optimise Source Location: /class.csstidy_optimise.php
### Class Overview
CSS Optimising Class #### Author(s): Florian Schmitz (floele at gmail dot com) 2005-2006 #### Version: 1.0 | ### Methods csstidy_optimise compress_important compress_numbers cut_color dissolve_4value_shorthands dissolve_short_bg explode_ws merge_4value_shorthands merge_bg merge_selectors postparse shorthand shorthands subvalue value
### Class Details [line 39] CSS Optimising Class This class optimises CSS data generated by csstidy. #### Tags:
version: | 1.0
author: | Florian Schmitz (floele at gmail dot com) 2005-2006
[ Top ] ### Class Methods ### constructor csstidy_optimise [line 47]
`csstidy_optimise csstidy_optimise( array &$css)`
Constructor #### Tags:
version: | 1.0
access: | private
#### Parameters:
array | $css | contains the class csstidy
[ Top ] ### method compress_important [line 278]
`string compress_important( string &$string)`
Removes unnecessary whitespace in ! important #### Tags:
version: | 1.1
access: | public
#### Parameters:
string | $string |
[ Top ] ### method compress_numbers [line 368]
`string compress_numbers( string $subvalue)`
Compresses numbers (ie. 1.0 becomes 1 or 1.100 becomes 1.1 ) #### Tags:
version: | 1.2
#### Parameters:
string | $subvalue |
[ Top ] ### method cut_color [line 293]
`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:
version: | 1.1
#### Parameters:
string | $color |
[ Top ] ### method dissolve_4value_shorthands [line 485]
`array dissolve_4value_shorthands( string $property, string $value)`
Dissolves properties like padding:10px 10px 10px to padding-top:10px;padding-bottom:10px;... #### Tags:
see: | csstidy_optimise::merge_4value_shorthands()
version: | 1.0
#### Parameters:
string | $property |
string | $value |
[ Top ] ### method dissolve_short_bg [line 639]
`array dissolve_short_bg( string $str_value)`
Dissolve background property #### Tags:
todo: | full CSS 3 compliance
see: | csstidy_optimise::merge_bg()
version: | 1.0
#### Parameters:
string | $str_value |
[ Top ] ### method explode_ws [line 543]
`array explode_ws( string $sep, string $string)`
Explodes a string as explode() does, however, not if $sep is escaped or within a string. #### Tags:
version: | 1.0
#### Parameters:
string | $sep | seperator
string | $string |
[ Top ] ### method merge_4value_shorthands [line 598]
`array merge_4value_shorthands( array $array)`
Merges Shorthand properties again, the opposite of dissolve_4value_shorthands() #### Tags:
see: | csstidy_optimise::dissolve_4value_shorthands()
version: | 1.2
#### Parameters:
array | $array |
[ Top ] ### method merge_bg [line 725]
`array merge_bg( array $input_css)`
Merges all background properties #### Tags:
todo: | full CSS 3 compliance
see: | csstidy_optimise::dissolve_short_bg()
version: | 1.0
#### Parameters:
array | $input_css |
[ Top ] ### method merge_selectors [line 435]
`array merge_selectors( 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. #### Tags:
version: | 1.2
access: | public
#### Parameters:
array | $array |
[ Top ] ### method postparse [line 63]
`void postparse( )`
Optimises $css after parsing #### Tags:
version: | 1.0
access: | public
[ Top ] ### method shorthand [line 221]
`string shorthand( string $value)`
Compresses shorthand values. Example: margin:1px 1px 1px 1px -> margin:1px #### Tags:
version: | 1.0
access: | public
#### Parameters:
string | $value |
[ Top ] ### method shorthands [line 130]
`void shorthands( )`
Optimises shorthands #### Tags:
version: | 1.0
access: | public
[ Top ] ### method subvalue [line 158]
`void subvalue( )`
Optimises a sub-value #### Tags:
version: | 1.0
access: | public
[ Top ] ### method value [line 103]
`void value( )`
Optimises values #### Tags:
version: | 1.0
access: | public
[ Top ] Documentation generated on Mon, 15 May 2006 22:55:34 +0200 by phpDocumentor 1.3.0RC3