Browse Source

add very basic implementation of opposite-position function

this is implemented in compass as ruby code
master
Niko Sams 11 years ago
parent
commit
688c0d5edc
  1. 1
      lib/compass/_functions.scss
  2. 18
      lib/compass/functions/_constants.scss

1
lib/compass/_functions.scss

@ -1 +1,2 @@
@import "functions/lists";
@import "functions/constants";

18
lib/compass/functions/_constants.scss

@ -0,0 +1,18 @@
/*
* A partial implementation of the Ruby constants functions from Compass:
* https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
*/
@function opposite-position($from) {
@if ($from == top) {
@return bottom;
} @else if ($from == bottom) {
@return top;
} @else if ($from == left) {
@return right;
} @else if ($from == right) {
@return left;
} @else if ($from == center) {
@return center;
}
}
Loading…
Cancel
Save