$global-left: if($global-text-direction == rtl, right, left);
$global-right: if($global-text-direction == rtl, left, right);
+// Internal variable that contains the flex justifying options
+$-zf-flex-justify: -zf-flex-justify($global-text-direction);
+
/// Global tolerance for color pick contrast.
/// @type Number
$global-color-pick-contrast-tolerance: 0 !default;
@mixin foundation-flex-classes {
// Horizontal alignment using justify-content
- @each $hdir, $prop in map-remove($-zf-flex-justify, 'left') {
+ @each $hdir, $prop in $-zf-flex-justify {
.align-#{$hdir} {
@include flex-align($x: $hdir);
}
}
// Horizontal alignment Specifically for Vertical Menu
- @each $hdir, $prop in map-remove($-zf-flex-justify, 'left', 'justify', 'spaced') {
+ @each $hdir, $prop in map-remove($-zf-flex-justify, 'justify', 'spaced') {
.align-#{$hdir} {
&.vertical.menu > li > a {
@include flex-align($x: $hdir);
-$-zf-flex-justify: (
- 'left': flex-start,
- 'right': flex-end,
- 'center': center,
- 'justify': space-between,
- 'spaced': space-around,
-);
+@function -zf-flex-justify($text-direction){
+ $-zf-flex-justify: (
+ 'left': if($text-direction == rtl, flex-end, flex-start),
+ 'right': if($text-direction == rtl, flex-start, flex-end),
+ 'center': center,
+ 'justify': space-between,
+ 'spaced': space-around,
+ );
+
+ @return $-zf-flex-justify;
+}
+
$-zf-flex-align: (
'top': flex-start,