You are here

public function SassNumber::isUnitless in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/literals/SassNumber.php \SassNumber::isUnitless()

Returns a value indicating if this number is unitless.

Return value

boolean true if this number is unitless, false if not

3 calls to SassNumber::isUnitless()
SassNumber::coerce in phpsass/script/literals/SassNumber.php
Returns the value of this number converted to other units. The conversion takes into account the relationship between e.g. mm and cm, as well as between e.g. in and cm.
SassNumber::convert in phpsass/script/literals/SassNumber.php
Converts values and units. If this is a unitless numeber it will take the units of other; if not other is coerced to the units of this.
SassNumber::hasUnits in phpsass/script/literals/SassNumber.php
Returns a value indicating if this number has units.

File

phpsass/script/literals/SassNumber.php, line 390

Class

SassNumber
SassNumber class. Provides operations and type testing for Sass numbers. Units are of the passed value are converted the those of the class value if it has units. e.g. 2cm + 20mm = 4cm while 2 + 20mm = 22mm. @package PHamlP @subpackage …

Code

public function isUnitless() {
  return empty($this->numeratorUnits) && empty($this->denominatorUnits);
}