[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * A simple css name-value pair 5 * ex: width:100px; 6 * 7 * In bootstrap, there are about 600-1,000 simple name-value pairs (depending on how forgiving the match is) -vs- 6,020 dynamic rules (Less_Tree_Rule) 8 * Using the name-value object can speed up bootstrap compilation slightly, but it breaks color keyword interpretation: color:red -> color:#FF0000; 9 * 10 * @package Less 11 * @subpackage tree 12 */ 13 class Less_Tree_NameValue extends Less_Tree{ 14 15 public $name; 16 public $value; 17 public $index; 18 public $currentFileInfo; 19 public $type = 'NameValue'; 20 public $important = ''; 21 22 public function __construct($name, $value = null, $index = null, $currentFileInfo = null ){ 23 $this->name = $name; 24 $this->value = $value; 25 $this->index = $index; 26 $this->currentFileInfo = $currentFileInfo; 27 } 28 29 public function genCSS( $output ){ 30 31 $output->add( 32 $this->name 33 . Less_Environment::$_outputMap[': '] 34 . $this->value 35 . $this->important 36 . (((Less_Environment::$lastRule && Less_Parser::$options['compress'])) ? "" : ";") 37 , $this->currentFileInfo, $this->index); 38 } 39 40 public function compile ($env){ 41 return $this; 42 } 43 44 public function makeImportant(){ 45 $new = new Less_Tree_NameValue($this->name, $this->value, $this->index, $this->currentFileInfo); 46 $new->important = ' !important'; 47 return $new; 48 } 49 50 51 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |