private function SassNumber::areConvertable in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/literals/SassNumber.php \SassNumber::areConvertable()
Returns a value indicating if all the units are capable of being converted
Parameters
array units to test:
Return value
boolean true if all units can be converted, false if not
1 call to SassNumber::areConvertable()
- SassNumber::coercionFactor in phpsass/
script/ literals/ SassNumber.php - Calculates the corecion factor to apply to the value
File
- phpsass/
script/ literals/ SassNumber.php, line 353
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
private function areConvertable($units) {
$convertable = array_keys(self::$unitConversion);
foreach ($units as $unit) {
if (!in_array($unit, $convertable)) {
return false;
}
}
return true;
}