Skip to content

[DEPRECATED] Create custom CSS keywords which can be used in declarations

License

Notifications You must be signed in to change notification settings

gavinmcfarland/postcss-keywords

Repository files navigation

PostCSS Keywords PostCSS

NPM Version Build Status Support Chat

Please use PostCSS Custom Values as work on this plugin is [DEPRECATED]

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

About

[DEPRECATED] Create custom CSS keywords which can be used in declarations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages