An open API service indexing awesome lists of open source software.

https://github.com/luckyraul/gulp-extract-media-query

Gulp plugin, which extracts media queries to a separate file
https://github.com/luckyraul/gulp-extract-media-query

css gulp media-query

Last synced: 3 months ago
JSON representation

Gulp plugin, which extracts media queries to a separate file

Awesome Lists containing this project

README

        

# gulp-extract-media-query
Gulp plugin, which extracts media queries into separate files.

HOW TO USE
-------
```js
var gulp = require('gulp');
var extractMediaQuery = require('gulp-extract-media-query');

gulp.task('css', function() {
gulp.src('src/style.css')
.pipe(extractMediaQuery({
match: '(min-width: 768px)',
postfix: '-768'
}))
.pipe(gulp.dest('build'));
});
```

Source CSS sample
-------
```css
h1 {
font-size: 30px;
}

@media (min-width: 768px) {
h1 {
font-size: 20px;
}
}
```
Result CSS files
-------


style.css
style-768.css


h1 {

font-size: 30px;
}

h1 {

font-size: 20px;
}

You can include them in your html:
```html

```