MDL-49518 libraries: Update lessphp to 1.7.0.3
This commit is contained in:
Regular → Executable
+13
-13
@@ -13,19 +13,19 @@ class Less_Tree_Unit extends Less_Tree{
|
||||
public $backupUnit;
|
||||
public $type = 'Unit';
|
||||
|
||||
function __construct($numerator = array(), $denominator = array(), $backupUnit = null ){
|
||||
public function __construct($numerator = array(), $denominator = array(), $backupUnit = null ){
|
||||
$this->numerator = $numerator;
|
||||
$this->denominator = $denominator;
|
||||
$this->backupUnit = $backupUnit;
|
||||
}
|
||||
|
||||
function __clone(){
|
||||
public function __clone(){
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Less_Tree::genCSS
|
||||
*/
|
||||
function genCSS( $output ){
|
||||
public function genCSS( $output ){
|
||||
|
||||
if( $this->numerator ){
|
||||
$output->add( $this->numerator[0] );
|
||||
@@ -37,7 +37,7 @@ class Less_Tree_Unit extends Less_Tree{
|
||||
}
|
||||
}
|
||||
|
||||
function toString(){
|
||||
public function toString(){
|
||||
$returnStr = implode('*',$this->numerator);
|
||||
foreach($this->denominator as $d){
|
||||
$returnStr .= '/'.$d;
|
||||
@@ -45,7 +45,7 @@ class Less_Tree_Unit extends Less_Tree{
|
||||
return $returnStr;
|
||||
}
|
||||
|
||||
function __toString(){
|
||||
public function __toString(){
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
@@ -53,33 +53,33 @@ class Less_Tree_Unit extends Less_Tree{
|
||||
/**
|
||||
* @param Less_Tree_Unit $other
|
||||
*/
|
||||
function compare($other) {
|
||||
public function compare($other) {
|
||||
return $this->is( $other->toString() ) ? 0 : -1;
|
||||
}
|
||||
|
||||
function is($unitString){
|
||||
public function is($unitString){
|
||||
return $this->toString() === $unitString;
|
||||
}
|
||||
|
||||
function isLength(){
|
||||
public function isLength(){
|
||||
$css = $this->toCSS();
|
||||
return !!preg_match('/px|em|%|in|cm|mm|pc|pt|ex/',$css);
|
||||
}
|
||||
|
||||
function isAngle() {
|
||||
public function isAngle() {
|
||||
return isset( Less_Tree_UnitConversions::$angle[$this->toCSS()] );
|
||||
}
|
||||
|
||||
function isEmpty(){
|
||||
public function isEmpty(){
|
||||
return !$this->numerator && !$this->denominator;
|
||||
}
|
||||
|
||||
function isSingular() {
|
||||
public function isSingular() {
|
||||
return count($this->numerator) <= 1 && !$this->denominator;
|
||||
}
|
||||
|
||||
|
||||
function usedUnits(){
|
||||
public function usedUnits(){
|
||||
$result = array();
|
||||
|
||||
foreach(Less_Tree_UnitConversions::$groups as $groupName){
|
||||
@@ -101,7 +101,7 @@ class Less_Tree_Unit extends Less_Tree{
|
||||
return $result;
|
||||
}
|
||||
|
||||
function cancel(){
|
||||
public function cancel(){
|
||||
$counter = array();
|
||||
$backup = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user