From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- .../oyejorge/less.php/lib/Less/Tree/Attribute.php | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 vendor/oyejorge/less.php/lib/Less/Tree/Attribute.php (limited to 'vendor/oyejorge/less.php/lib/Less/Tree/Attribute.php') diff --git a/vendor/oyejorge/less.php/lib/Less/Tree/Attribute.php b/vendor/oyejorge/less.php/lib/Less/Tree/Attribute.php new file mode 100644 index 00000000..32b8900d --- /dev/null +++ b/vendor/oyejorge/less.php/lib/Less/Tree/Attribute.php @@ -0,0 +1,54 @@ +key = $key; + $this->op = $op; + $this->value = $value; + } + + public function compile($env){ + + $key_obj = is_object($this->key); + $val_obj = is_object($this->value); + + if( !$key_obj && !$val_obj ){ + return $this; + } + + return new Less_Tree_Attribute( + $key_obj ? $this->key->compile($env) : $this->key , + $this->op, + $val_obj ? $this->value->compile($env) : $this->value); + } + + /** + * @see Less_Tree::genCSS + */ + public function genCSS( $output ){ + $output->add( $this->toCSS() ); + } + + public function toCSS(){ + $value = $this->key; + + if( $this->op ){ + $value .= $this->op; + $value .= (is_object($this->value) ? $this->value->toCSS() : $this->value); + } + + return '[' . $value . ']'; + } +} \ No newline at end of file -- cgit v1.2.2