csstidy
[ class tree: csstidy ] [ index: csstidy ] [ 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.

This file is part of CSSTidy.

CSSTidy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

CSSTidy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CSSTidy; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA




Tags:

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








compress_numbers [line 110]

string compress_numbers( string $subvalue, [string $property = NULL])

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



Tags:

version:  1.1


Parameters

string   $subvalue  
string   $property   property needed to check wheter <number>-values are allowed or not
[ Top ]



cut_color [line 37]

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 ]



dissolve_4value_shorthands [line 177]

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 331]

array dissolve_short_bg( string $str_value)

Dissolve background property



Tags:

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


Parameters

string   $str_value  
[ Top ]



explode_ws [line 235]

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 290]

array merge_4value_shorthands( array $array)

Merges Shorthand properties again, the opposite of dissolve_4value_shorthands()



Tags:

see:  dissolve_4value_shorthands()
version:  1.2


Parameters

array   $array  
[ Top ]



merge_bg [line 417]

array merge_bg( array $input_css)

Merges all background properties



Tags:

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


Parameters

array   $input_css  
[ Top ]



Documentation generated on Fri, 3 Feb 2006 16:22:04 +0100 by phpDocumentor 1.3.0RC3