You are here

function sassy_compass__opposite_position in Sassy 7.3

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

File

sassy_compass/functions/constants.inc, line 24

Code

function sassy_compass__opposite_position($position) {
  $list = sassy_compass__list($position, ' ');
  foreach ($list as $key => $val) {
    switch ($val) {
      case 'top':
        $val = 'bottom';
        break;
      case 'bottom':
        $val = 'top';
        break;
      case 'left':
        $val = 'right';
        break;
      case 'right':
        $val = 'left';
        break;
    }
    $list[$key] = $val;
  }
  return implode(' ', $list);
}