1.0.0 • Published 7 years ago

postcss-ellipsis v1.0.0

Weekly downloads
60
License
MIT
Repository
github
Last release
7 years ago

A PostCSS plugin to add automatically add overflow: hidden and white-space: nowrap when text-overflow: ellipsis is declared

Installation

npm install postcss-ellipsis

Example

div {
    text-overflow: ellipsis
}

will produce

div { 
    display: block; 
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

Usage

Using Gulp.

var gulp            = require('gulp'),
    postcss         = require('gulp-postcss'),
    ellipsis        = require('postcss-ellipsis');

gulp.task('css', function() {
    gulp.src('path/to/dev/css').
        .pipe(postcss({
            // use it after nesting plugins
            ellipsis
        }))
        .pipe(gulp.dest('path/to/build/css'));
});

// rest of the gulp file