1.0.0 • Published 9 years ago

css-scss-cli v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

css-scss-cli Build Status js-standard-style

Convert PostCSS style CSS to SCSS.

Installation

npm i -g css-scss-cli

Usage

css-scss --help

  Convert PostCSS style CSS to SCSS.

  Usage
    $ css-scss <input.css> <output.scss>

  Example
    $ css-scss --help
    $ css-scss input.css output.scss
    $ css-scss input.css > output.scss
    $ css-scss < input.css > output.scss

Input

: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

$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

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 Request

Crafted with <3 by John Otander (@4lpine).


This package was initially generated with yeoman and the p generator.