https://github.com/matype/custom-properties-sass
Transpile Custom Properties to Sass variables
https://github.com/matype/custom-properties-sass
Last synced: 9 months ago
JSON representation
Transpile Custom Properties to Sass variables
- Host: GitHub
- URL: https://github.com/matype/custom-properties-sass
- Owner: matype
- License: other
- Created: 2016-08-29T02:57:16.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-29T03:11:55.000Z (almost 10 years ago)
- Last Synced: 2024-12-28T02:44:27.366Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# custom-properties-sass [](https://travis-ci.org/morishitter/custom-properties-sass)
Transpile Custom Properties to Sass variables
## Installation
```shell
$ npm install custom-properties-sass
```
## Example
Input:
```css
:root {
--red: #ff4136;
--green: #2ecc40;
--blue: #0074d9;
}
```
Output:
```scss
$red: #ff4136;
$green: #2ecc40;
$blue: #0074d9;
```
## Usage
```js
// dependencies
var fs = require("fs")
var postcss = require("postcss")
var customPropertieSass = require("custom-propertie-sass")
// css to be processed
var css = fs.readFileSync("input.css", "utf8")
// process css
var output = postcss()
.use(customPropertieSass())
.process(css)
.css
```
## License
The MIT License (MIT)
Copyright (c) 2016 Masaaki Morishita