app/assets/stylesheets/functions/_private.scss in neat-1.2.1 vs app/assets/stylesheets/functions/_private.scss in neat-1.3.0
- old
+ new
@@ -68,5 +68,40 @@
}
}
@return $values;
}
+
+// Layout direction
+@function get-direction($layout, $default) {
+ $direction: nil;
+
+ @if $layout == LTR or $layout == RTL {
+ $direction: direction-from-layout($layout);
+ } @else {
+ $direction: direction-from-layout($default);
+ }
+
+ @return $direction;
+}
+
+@function direction-from-layout($layout) {
+ $direction: nil;
+
+ @if $layout == LTR {
+ $direction: right;
+ } @else {
+ $direction: left;
+ }
+
+ @return $direction;
+}
+
+@function get-opposite-direction($direction) {
+ $opposite-direction: left;
+
+ @if $direction == left {
+ $opposite-direction: right;
+ }
+
+ @return $opposite-direction;
+}