13 public function toCSS(){
14 $output = new Less_Output();
15 $this->genCSS($output);
16 return $output->toString();
21 * Generate CSS by adding it to the output object
23 * @param Less_Output $output The output
26 public function genCSS($output){}
30 * @param Less_Tree_Ruleset[] $rules
32 public static function outputRuleset( $output, $rules ){
34 $ruleCnt = count($rules);
35 Less_Environment
::$tabLevel++
;
39 if( Less_Parser
::$options['compress'] ){
41 for( $i = 0; $i < $ruleCnt; $i++
){
42 $rules[$i]->genCSS( $output );
46 Less_Environment
::$tabLevel--;
52 $tabSetStr = "\n".str_repeat( ' ' , Less_Environment
::$tabLevel-1 );
53 $tabRuleStr = $tabSetStr.' ';
56 for($i = 0; $i < $ruleCnt; $i++
){
57 $output->add( $tabRuleStr );
58 $rules[$i]->genCSS( $output );
60 Less_Environment
::$tabLevel--;
61 $output->add( $tabSetStr.'}' );
65 public function accept($visitor){}
68 public static function ReferencedArray($rules){
69 foreach($rules as $rule){
70 if( method_exists($rule, 'markReferenced') ){
71 $rule->markReferenced();
80 public static function __set_state($args){
82 $class = get_called_class();
83 $obj = new $class(null,null,null,null);
84 foreach($args as $key => $val){