1.0.0 • Published 5 years ago

postcss-group v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

PostCSS Group

shout to johnie;

postcss-crip的延伸添加了组合简写;

Installation

$ npm install postcss-group --save-dev

Input:

/* Input example */
.crip {
  wh: 100px 100px;
  flc: 12px 20px #000;
}

Output:

/* Output example */
.crip {
  width: 100px;
  height: 100px;
  font-size: 12px;
  line-height: 20px;
  color: #000;
}

See the full list of abbreviations

Options

(default: {})

var options = {
  'abc': ['a','b','c']
}

var output = postcss(crip(options))
  .process(css)
  .css;

input.css

td { 
  abc: a b c;  
}

output.css

td { 
  a: a;
  b: b;
  c: c;
}