pc

postcss-compass

compass mixins with libsass

Showing:

Popularity

Downloads/wk

2

GitHub Stars

2

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

2

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Postcss-compass

PostCSS plugin for migration from Compass to Libsass. First of all include compass mixins from compass-mixins, it will do most work. Plugin tries to convert features tphat sass can't handle. For now it cover only image-url() , image-width(), image-height(), font-files() and fix some linear-gradient bugs of compass-mixins

.foo {
  background-image: image-url('bar.png');
  background-size: image-width('bar.png') image-height('bar.png');
}
.foo {
  background-image: url('../images/bar.png');
  background-size: 64px 64px;
}

Usage

var post_compass = require('postcss-compass');
...
gulp.task('sass', function() {
    var processors = [
        post_compass({
            css: './css',
            font: './fonts',
            image: './images'
        }),
        autoprefixer({ remove: true })
    ];
    return gulp.src('src/scss/**/*.scss')
        .pipe(sass())
        .pipe(postcss(processors))
        .pipe(gulp.dest('./css'));
});

See PostCSS docs for examples for your environment.

Options

Like Compass has

options.css

Type: String

Output directory

options.font

Type: String

Directory with fonts

options.image

Type: String

Directory with images

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100