public function SassNumber::isUnitless in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/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 phamlp/
sass/ 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. * * If this number is unitless, it will simply return itself with…
- SassNumber::convert in phamlp/
sass/ 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 phamlp/
sass/ script/ literals/ SassNumber.php - * Returns a value indicating if this number has units. *
File
- phamlp/
sass/ script/ literals/ SassNumber.php, line 394
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 =…
Code
public function isUnitless() {
return empty($this->numeratorUnits) && empty($this->denominatorUnits);
}