<commit_before>//
// Util
// -----------------------------------------------------------------------------
//
// ### Usage:
// 提供简便的mixin工具。
//
// ### Example:
// .some-floats-inside {
//     .clearfix();
// };

@import 'variables';

// clearfix via http://h5bp.com/q
.clearfix() {
    &:before,
    &:after {
        display: table;
        content: "";
    }
    &:after {
        clear: both;
    }
}
.clearfix() when (@support-old-ie) {
    *zoom: 1;
}

// size settings
.size(@size) {
    width: @size;
    height: @size;
}
.size(@wdith, @height) {
    width: @wdith;
    height: @height;
}

//
// text overflow
// 
// Know issue:
// 指定参数（行数）的功能只支持WebKit。

.text-overflow(...) {
    overflow: hidden;
}
.text-overflow() {
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-overflow(@line-number) {
    display: -webkit-box;
    -webkit-line-clamp: @line-number;
    -webkit-box-orient: vertical;  
}<commit_msg>add .hide-text for util.less<commit_after>//
// Util
// -----------------------------------------------------------------------------
//
// ### Usage:
// 提供简便的mixin工具。
//
// ### Example:
// .some-floats-inside {
//     .clearfix();
// };

@import 'variables';

// clearfix via http://h5bp.com/q
.clearfix() {
    &:before,
    &:after {
        display: table;
        content: "";
    }
    &:after {
        clear: both;
    }
}
.clearfix() when (@support-old-ie) {
    *zoom: 1;
}

// size settings
.size(@size) {
    width: @size;
    height: @size;
}
.size(@wdith, @height) {
    width: @wdith;
    height: @height;
}

//
// text overflow
// 
// Known issue:
// 指定参数（行数）的功能只支持WebKit。

.text-overflow(...) {
    overflow: hidden;
}
.text-overflow() {
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-overflow(@line-number) {
    display: -webkit-box;
    -webkit-line-clamp: @line-number;
    -webkit-box-orient: vertical;  
}

//
// hide text (to apply something like image replacement)
//
// Known issue:
// 当元素宽度大于视口宽度时失效

.hide-text() {
    white-space: nowrap;
    text-indent: 100%;
    overflow: hidden;
}
{'fraction_non_alphanumeric': 0.26605058365758755, 'fraction_numerical': 0.003404669260700389, 'mean_word_length': 1.7281167108753315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5953037', 'n_tokens_mistral': 782, 'n_tokens_neox': 778, 'n_words': 139}