[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/lessphp/Tree/ -> NameValue.php (source)

   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  
  21  	public function __construct($name, $value = null, $index = null, $currentFileInfo = null ){
  22          $this->name = $name;
  23          $this->value = $value;
  24          $this->index = $index;
  25          $this->currentFileInfo = $currentFileInfo;
  26      }
  27  
  28  	function genCSS( $output ){
  29  
  30          $output->add(
  31              $this->name
  32              . Less_Environment::$_outputMap[': ']
  33              . $this->value
  34              . (((Less_Environment::$lastRule && Less_Parser::$options['compress'])) ? "" : ";")
  35              , $this->currentFileInfo, $this->index);
  36      }
  37  
  38  	public function compile ($env){
  39          return $this;
  40      }
  41  }


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1