/// This is equivalent to `text-overflow: clip;`.
/// @example text-overflow: clip;
/// @name .k-text-clip
/// @group text-overflow
/// @contextType css

/// This is equivalent to `text-overflow: ellipsis; white-space: nowrap; overflow: hidden;`.
/// @example text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
/// @name .k-text-ellipsis
/// @group text-overflow
/// @contextType css

@use "sass:map";
@use "../_globals.scss" as *;

// Register
@use "@progress/kendo-theme-core/scss/mixins/import-once.scss" as *;

@mixin kendo-utils--typography--text-overflow() {
    @include import-once("utils-typography-text-overflow") {

        // Text overflow utility classes
        $kendo-utils-text-overflow: map.get( $kendo-utils, "text-overflow" ) !default;
        @include generate-utils( text, text-overflow, $kendo-utils-text-overflow );


        // Text truncate utility classes
        .#{$kendo-prefix}text-truncate {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .\!#{$kendo-prefix}text-truncate {
            white-space: nowrap !important; // stylelint-disable-line declaration-no-important
            overflow: hidden !important; // stylelint-disable-line declaration-no-important
            text-overflow: ellipsis !important; // stylelint-disable-line declaration-no-important
        }

        // Legacy aliases
        .#{$kendo-prefix}text-ellipsis { @extend .#{$kendo-prefix}text-truncate !optional; }
        .\!#{$kendo-prefix}text-ellipsis { @extend .\!#{$kendo-prefix}text-truncate !optional; }

    }
}
