postcss-keywords

2.0.0 • Public • Published

PostCSS Keywords PostCSS

NPM Version Build Status Support Chat

PostCSS Keywords lets you create custom keywords which can be used in declarations.

@keyword small {
  value: 24px;
  property: padding, margin;
}
 
@keyword small {
  value: 16px;
  property: font-size;
}
 
@keyword medium {
  value: 40px;
  property: padding, margin;
}
 
.example {
  font-size: small;
  padding: small medium;
  margin: small;
}

Outputs:

.example {
  font-size: 16px;
  padding: 24px 40px;
  margin: 24px;
}

Setup

Add it to your project:

npm install postcss-keywords --save-dev

Package Sidebar

Install

npm i postcss-keywords

Weekly Downloads

3

Version

2.0.0

License

CC0-1.0

Unpacked Size

12.9 kB

Total Files

6

Last publish

Collaborators

  • limitlessloop