// Export a component into the compiled output only once
// Also check to see if it has been excluded from the output all together
@mixin export($module) {
    @if (index($modules-excluded, $module) == null and index($modules-exported, $module) == null) {
        $modules-exported: append($modules-exported, $module) !global;

        @content;
    }
}

// Container clear fix for floats
@mixin clear-fix {
    &::after {
        content: "";
        display: table;
        clear: both;
    }
}

// Reset an inline-block element to defaults
@mixin reset-inline-block {
    display: inline-block;
    position: relative;
    vertical-align: middle;
}

// Reset a list and remove default styles
@mixin reset-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

// Position an element to take up the whole screen
@mixin full-screen($position: fixed) {
    @if ($position != "") {
        position: $position;
    }
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

// Align an element in the center of another element
@mixin position-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@mixin size-small {
    font-size: $small-size;
    padding: $small-padding;
}

@mixin size-medium {
    font-size: $medium-size;
    padding: $medium-padding;
}

@mixin size-large {
    font-size: $large-size;
    padding: $large-padding;
}

// Generate a self selector or parent selector for assigning size classes
@mixin is-size($size, $self: true, $parent: false) {
    $selectors: ();

    @if $self {
        $selectors: append($selectors, unquote("&" + $size), "comma");
    }

    @if $parent {
        $selectors: append($selectors, unquote($size + " &"), "comma");
    }

    #{$selectors} {
        @content;
    }
}

@mixin is-small($self: true, $parent: false) {
    @if $enable-small-size {
        @include is-size($size-small-class, $self, $parent) {
            @content;
        }
    }
}

@mixin is-large($self: true, $parent: false) {
    @if $enable-large-size {
        @include is-size($size-large-class, $self, $parent) {
            @content;
        }
    }
}

// Generate code blocks for LTR and RTL styles.
@mixin ltr() {
    &[dir="ltr"] {
        @content;
    }
}

@mixin rtl() {
    &[dir="rtl"] {
        @content;
    }
}