You are here

public static function SassExtentionsCompassFunctionsLists::first_value_of in Sassy 7

File

phamlp/sass/extensions/compass/functions/lists.php, line 22

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 first_value_of($list) {
  if ($list instanceof SassString) {
    $items = preg_split(self::SPACE_SEPARATOR, $list->value);
    return new SassString($items[0]);
  }
  else {
    return $list;
  }
}