You are here

function sassy_compass__blank in Sassy 7.3

Same name and namespace in other branches
  1. 7.2 extensions/compass/functions/lists.inc \sassy_compass__blank()

File

sassy_compass/functions/lists.inc, line 3

Code

function sassy_compass__blank($object) {
  if (is_object($object)) {
    $object = $object->value;
  }
  $result = false;
  if (is_bool($object)) {
    $result = !$object;
  }
  if (is_string($object)) {
    $result = strlen(trim($object, ' ,')) === 0;
  }
  return new SassBoolean($result);
}