Skip to content

Commit

Permalink
Merge pull request #11 from koala-framework/master
Browse files Browse the repository at this point in the history
add very basic implementation of opposite-position function
  • Loading branch information
Igosuki committed Sep 2, 2014
2 parents 2388322 + 688c0d5 commit 5ccf32b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/compass/_functions.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "functions/lists";
@import "functions/constants";
18 changes: 18 additions & 0 deletions lib/compass/functions/_constants.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 5ccf32b

Please sign in to comment.