postcss-custom-units
A PostCSS plugin allowing for on-the-fly custom units for uniform spacing, vertical-rhythm, and baseline grids.
Examples
Create a value, then utilize that value. Let's say you wanted to build you line-heights off a baseline grid:
Yields:
Options
Default:
prefix: 'unit'
unit
(String) Allows you to change the prefix customUnits uses to watch for your inline units.
Usage
Install:
npm install postcss-custom-units --save
Then include the plugin:
process
See PostCSS docs for examples for your environment.
Licence
Released under the MIT license.