custom-properties-sass

0.1.0 • Public • Published

custom-properties-sass Build Status

Transpile Custom Properties to Sass variables

Installation

$ npm install custom-properties-sass

Example

Input:

:root {
  --red: #ff4136;
  --green: #2ecc40;
  --blue: #0074d9;
}

Output:

$red: #ff4136;
$green: #2ecc40;
$blue: #0074d9;
 

Usage

// 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

Readme

Keywords

Package Sidebar

Install

npm i custom-properties-sass

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • morishitter