function sassy_compass__opposite_position in Sassy 7.2
Same name and namespace in other branches
- 7.3 sassy_compass/functions/constants.inc \sassy_compass__opposite_position()
File
- extensions/
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);
}