@import "compass/utilities/general/float";
@import "base";

@mixin layoutgala-liquid (
	$aside1-side: left,
	$aside2-side: right,
	$aside1-width: 200px,
	$aside2-width: 200px
) {
//	$content-side: #{opposite-position(#{if ($aside1-side == center,$aside2-side,$aside1-side)})};
	$content-side: #{if ($aside1-side == center,opposite-position($aside2-side),opposite-position($aside1-side))};
	$content-float: #{if($content-side == right,right,left)};
	#{$layoutgala-wrapper-selector} {
		@include float($content-float);
		width: 100%;
		margin-left: -($aside1-width + $aside2-width);
	}
	#{$layoutgala-content-selector} {
		margin-left: ($aside1-width + $aside2-width);
	}
	#{$layoutgala-aside1-selector} {
		@include float(#{opposite-direction($aside1-side)});
		width: $aside1-width;
	}
	#{$layoutgala-aside2-selector} {
		@include float($content-float);
		width: $aside2-width;
		@include layoutgala-negative-margin-left ($aside2-side, $aside2-width);
	}
	#{$layoutgala-footer-selector} {
		@if $aside1-side == center and $aside2-side == left {
			clear: both;
		} @else {
			clear: $content-float;
		}
		width: 100%;
	}
}
