postcss-alias

PostCSS plugin that lets you create custom aliases for CSS properties with an @rule

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
postcss-alias
4832.0.07 years ago9 years agoMinified + gzip package size for postcss-alias in KB

Readme

PostCSS Alias
!NPM versionnpm-imagenpm-url !Build Statustravis-imagetravis-url !Dependency Statusdaviddm-imagedaviddm-url
PostCSSPostCSS plugin that lets you create custom aliases for CSS properties with an @alias rule.
Part of Rucksack - CSS Superpowers.
Input
@alias {
  fs: font-size;
  bg: background;
}

.aliased {
  fs: 16px;
  bg: white;
}

Output
.aliased {
  font-size: 16px;
  background: white;
}

Note: Aliases in property values (eg: transition: bg 200ms) are not supported

Usage

postcss([ require('postcss-alias') ])

See PostCSSPostCSS docs for examples for your environment.

MIT © Sean King