Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dinhani/gulp-css-remove-attributes
Remove CSS attributes from stylesheets that you do not have full control.
https://github.com/dinhani/gulp-css-remove-attributes
css gulp gulp-plugin preprocessor
Last synced: 4 months ago
JSON representation
Remove CSS attributes from stylesheets that you do not have full control.
- Host: GitHub
- URL: https://github.com/dinhani/gulp-css-remove-attributes
- Owner: dinhani
- License: mit
- Created: 2017-05-02T21:37:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-03T04:55:01.000Z (almost 8 years ago)
- Last Synced: 2024-08-09T09:37:52.137Z (6 months ago)
- Topics: css, gulp, gulp-plugin, preprocessor
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gulp-css-remove-attributes
- Size: 5.86 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-css-remove-attributes
Remove CSS attributes from stylesheets that you do not have full control.
It is useful to completly remove styles from libraries like Bootstrap and Semantic UI instead of having to overwrite them with custom CSS.
## Install
```
$ npm install --save-dev gulp-css-remove-attributes
```## Usage
```js
var gulp = require('gulp');
var removeAttributes = require('gulp-css-remove-attributes')// in this example the box-shadow and text-transform attributes will not be
// present in the generated CSS file
gulp.task('default', function () {
return gulp.src('src/*.css')
.pipe(removeAttributes(['box-shadow', 'text-transform'], {compress: true}))
.pipe(gulp.dest('dist'));
});
```## Documentation
> ### removeAttributes(attributes, [options])
> #### attributes
>
> Type: `array`
>
> CSS attributes that should be removed from the input files.> #### options
>
> Type: `object`
>
> Options that are forwarded to [css](https://github.com/reworkcss/css#api) library.
>
> Probably only `compress` and `indent` options will be useful in the context of this plugin.