Skip to content

xieqingtian/postcss-remove-style

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postcss-remove-style

一个删除指定 css 属性的插件

Installation

npm i postcss-remove-style -D

Usage

const gulp = require('gulp')
const postcss = require('gulp-postcss')
const removeStyle = require('postcss-remove-style')({
    '*': ['color'], // 删除所有样式里的color属性
    '.b': '*'       // 删除.b类
    '.c': ['font']  // 删除.c里的font属性
})

gulp.task('test', function() {
    return gulp
        .src('./test.css')
        .pipe(postcss([removeStyle]))
        .pipe(gulp.dest('css'))
})

About

一个删除指定css属性的插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published