public static function SassExtentionsCompassFunctionsLists::last_value_of in Sassy 7
File
- phamlp/
sass/ extensions/ compass/ functions/ lists.php, line 40
Class
- SassExtentionsCompassFunctionsLists
- Compass extension SassScript lists functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.extensions.compass.functions
Code
public static function last_value_of($list) {
if ($list instanceof SassString) {
$items = array_reverse(preg_split(self::SPACE_SEPARATOR, $list->value));
return new SassString($items[0]);
}
else {
return $list;
}
}