@charset "UTF-8";

// @description
// * text-overflow utility class.
// * This file provides the `text-overflow` utility class.
// * It can be used as a standalone class in any where it is needed.

// @access public

// @version 1.0.0

// @author Khaled Mohamed

// @license MIT

// @repository: https://github.com/Black-Axis/sass-pire

// @namespace utils

// @module utils/text-overflow

// @dependencies:
// * LibMixin.text-overflow (mixin).

// @example 1
// * <div class="u-text-ellipsis"></div>

// @output 1
// * .u-text-ellipsis {
// *   -o-text-overflow: ellipsis;
// *   text-overflow: ellipsis;
// * }

// @example 2
// * <div class="u-text-clip"></div>

// @output 2
// * .u-text-clip {
// *   -o-text-overflow: clip;
// *   text-overflow: clip;
// * }

@use "../../mixins/typography/text-overflow" as LibMixin;

$text-overflow-values: (
    text-clip: clip,
    text-ellipsis: ellipsis,
    text-inherit: inherit,
    text-initial: initial,
    text-revert: revert,
    text-revert-layer: revert-layer,
    text-unset: unset
);

@each $text-overflow-class-name, $text-overflow-value in $text-overflow-values {
    .u-#{$text-overflow-class-name} {
        @include LibMixin.text-overflow($text-overflow-value);
    }
}

.u-text-truncate {
    overflow: hidden;
    white-space: nowrap;
    
    @include LibMixin.text-overflow(ellipsis);
}
