Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johno/gulp-css-scss
Gulp plugin for converting CSS to Scss.
https://github.com/johno/gulp-css-scss
Last synced: 3 months ago
JSON representation
Gulp plugin for converting CSS to Scss.
- Host: GitHub
- URL: https://github.com/johno/gulp-css-scss
- Owner: johno
- License: mit
- Created: 2015-01-22T00:25:57.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-30T22:30:31.000Z (about 9 years ago)
- Last Synced: 2024-10-13T20:06:00.223Z (3 months ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# gulp-css-scss [![Build Status](https://secure.travis-ci.org/johnotander/gulp-css-scss.png?branch=master)](https://travis-ci.org/johnotander/gulp-css-scss) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
Gulp plugin for converting CSS to Scss, uses the [css-scss](https://github.com/jxnblk/css-scss) module created by [@jxnblk](https://twitter.com/jxnblk).
## Installation
```bash
npm install --save gulp-css-scss
```## Usage
```javascript
const gulp = require('gulp');
const cssScss = require('gulp-css-scss');gulp.task('css-scss', () => {
return gulp.src('my-file.css')
.pipe(cssScss())
.pipe(gulp.dest('scss'));
});gulp.task('default', ['css-scss']);
```#### Input
```css
:root {
--red: #f00;
}.warning {
color: var(--red):
}@media (--breakpoint-small) {
.sm-col-6 { width: 50% }
}@custom-media --breakpoint-small (min-width: 40em);
.col-4 { calc( 4 / 12 * 100% ) }
```#### Output
```scss
$red: #f00 !default;.warning {
color: $red;
}$breakpoint-small: '(min-width: 40em)' !default;
@media #{$breakpoint-small} {
.sm-col-6 { width: 50% }
}.col-4 { ( 4 / 12 * 100% ) }
```## License
MIT
## Related
*
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull RequestCrafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).
***
> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).