csspp
[ class tree: csspp ] [ index: csspp ] [ all elements ]

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:

filesource:  Source Code for this file
author:  Florian Schmitz (floele at gmail dot com) 2005








compress_numbers [line 79]

string compress_numbers( string &$subvalue)

Compresses numbers (ie. 1.0 becomes 1 or 1.100 becomes 1.1 )



Tags:

version:  1.1


Parameters

string   $subvalue  
[ Top ]



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:

version:  1.0


Parameters

string   $color  
[ Top ]



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:

see:  merge_4value_shorthands()
version:  1.0


Parameters

string   $property  
string   $value  
[ Top ]



dissolve_short_bg [line 276]

array dissolve_short_bg( string $str_value)

Dissolve background property, CSS3 will be compliant



Tags:

todo:  CSS 3 compliance
see:  merge_bg()
version:  1.0


Parameters

string   $str_value  
[ Top ]



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:

version:  1.0


Parameters

string   $sep   seperator
string   $string  
[ Top ]



merge_4value_shorthands [line 233]

array merge_4value_shorthands( array $array)

Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()



Tags:

see:  dissolve_4value_shorthands()
version:  1.0


Parameters

array   $array  
[ Top ]



merge_bg [line 362]

array merge_bg( array $input_css)

Merges all background properties



Tags:

todo:  CSS 3 compliance
see:  dissolve_short_bg()
version:  1.0


Parameters

array   $input_css  
[ Top ]



Documentation generated on Sat, 20 Aug 2005 17:04:15 +0200 by phpDocumentor 1.3.0RC3