$font-weights: (100, 200, 300, 400, 500, 600, 700);
$colors: $success-color, $error-color, $primary-color;

$text-colors: $colors;

$text-position: (left, right, center, justify);
$text-case: (uppercase, lowercase, capitalize);
$text-decoration: (overline, line-through, underline, underline overline, none);
$text-justify: (inter-word);
$text-overflow: (clip, ellipsis, string);
$text-white-space: (nowrap, pre, pre-line, pre-wrap);
$text-word-break: (break-all, keep-all, break-word);
$text-word-wrap: (break-word);
$vertical-align: (baseline, sub, super, top, text-top, middle, bottom, text-bottom);
$overflow: (scroll, visible, hidden, auto);
$position: (absolute, relative, fixed, static);
$object-fit: (fill, contain, cover, scale-down);

@mixin text($args...) {
    @each $arg in $args {
        @each $val in $text-position {
            @if $val==$arg {
                text-align: ($arg);
            }
        }

        @each $val in $text-case {
            @if $val==$arg {
                text-transform: $arg;
            }
        }

        @each $val in $text-decoration {
            @if $val==$arg {
                text-decoration: $arg;
            }
        }

        @each $val in $text-justify {
            @if $val==$arg {
                text-justify: $arg;
            }
        }

        @each $val in $text-overflow {
            @if $val==$arg {
                text-overflow: $arg;
            }
        }

        @each $val in $text-colors {
            @if $val==$arg {
                color: $arg;
            }
        }

        @each $val in $text-white-space {
            @if $val==$arg {
                white-space: $arg;
            }
        }

        @each $val in $text-word-break {
            @if $val==$arg {
                word-break: $arg;
            }
        }

        @each $val in $position {
            @if $val==$arg {
                position: $arg;
            }
        }

        @each $val in $overflow {
            @if $val==$arg {
                overflow: $arg;
            }
        }

        @each $val in $object-fit {
            @if $val==$arg {
                @include object-fit($arg);
            }
        }
    }
}
