postcss-ellipsis

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i postcss-ellipsis

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • arpadhegedus