Skip to content

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

License

Notifications You must be signed in to change notification settings

arpadHegedus/postcss-ellipsis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published