You are here

public static function SassScriptFunctions::units in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/SassScriptFunctions.php \SassScriptFunctions::units()

* Inspects the units of the number, returning it as a quoted string. *

Parameters

SassNumber The number to inspect: * @return new SassString The units of the number * @throws SassScriptFunctionException If $number is not a number

3 calls to SassScriptFunctions::units()
SassScriptFunctions::opacify in phamlp/sass/script/SassScriptFunctions.php
* Makes a colour more opaque. *
SassScriptFunctions::transparentize in phamlp/sass/script/SassScriptFunctions.php
* Makes a colour more transparent. *
SassScriptFunctions::unit in phamlp/sass/script/SassScriptFunctions.php
* Inspects the unit of the number, returning it as a quoted string. * Alias for units. *

File

phamlp/sass/script/SassScriptFunctions.php, line 667

Class

SassScriptFunctions
SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script

Code

public static function units($number) {
  SassLiteral::assertType($number, 'SassNumber');
  return new SassString($number->units);
}