constants.php in Sassy 7
File
phamlp/sass/extensions/compass/functions/constants.php
View source
<?php
class SassExtentionsCompassFunctionsConstants {
public static function opposite_position($pos) {
$opposites = array();
foreach (explode(' ', $pos
->toString()) as $position) {
switch (trim($position)) {
case 'top':
$opposites[] = 'bottom';
break;
case 'right':
$opposites[] = 'left';
break;
case 'bottom':
$opposites[] = 'top';
break;
case 'left':
$opposites[] = 'right';
break;
case 'center':
$opposites[] = 'center';
break;
default:
throw new Exception('Cannot determine the opposite of ' . trim($position));
}
}
return new SassString(join(' ', $opposites));
}
}
Classes
Name |
Description |
SassExtentionsCompassFunctionsConstants |
Compass extension SassScript constants functions class.
A collection of functions for use in SassSCript.
@package PHamlP
@subpackage Sass.extensions.compass.functions |