\csstidy_print
CSS Printing class
This class prints CSS data generated by csstidy.
- Author: Florian Schmitz (floele at gmail dot com) 2005-2006
Synopsis
class csstidy_print
{
- // members
- public string $input_css = '';
- public string $output_css = '';
- public string $output_css_plain = '';
- // methods
- public void csstidy_print()
- public void _reset()
- public string plain()
- public string formatted()
- public void _print()
- public mixed _seeknocomment()
- public void _convert_raw_css()
- public string _htmlsp()
- public float get_ratio()
- public string get_diff()
- public integer size()
Members
public
- $input_css
—
string
Saves the input CSS string - $output_css
—
string
Saves the formatted CSS string - $output_css_plain
—
string
Saves the formatted CSS string (plain text)
Methods
public
- _convert_raw_css() — Converts $this->css array to a raw array ($this->tokens)
- _htmlsp() — Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner.
- _print() — Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain
- _reset() — Resets output_css and output_css_plain (new css code)
- _seeknocomment() — Gets the next token type which is $move away from $key, excluding comments
- csstidy_print() — Constructor
- formatted() — Returns the formatted CSS code
- get_diff() — Get difference between the old and new code in bytes and prints the code if necessary.
- get_ratio() — Get compression ratio
- plain() — Returns the CSS code as plain text
- size() — Get the size of either input or output CSS in KB