A postcss plugin for typography.js
npm:
npm install postcss-typography
Dependencies:
var postcss = require('postcss');
var typography = require('postcss-typography');
Use:
var processor = postcss().use(typography(options));
Process:
processor.process(css).then(function (result) {
console.log(result.css);
});
Yields:
* {
...
}
*:before {
...
}
*:after {
...
}
body {
...
}
img {
...
}
h1 {
...
}
h2 {
...
}
...
Options to pass through to the typography api
This plugin will replace the @typography
“at-rule” with the output of
typography.js. Any declarations within the at-rule block will be merged with
the final css output.