postcss-ellipsis
v1.0.0
Published
A postcss plugin to add automatically add overflow: hidden and white-space: nowrap when text-overflow: ellipsis is declared
Downloads
75
Readme
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