Package Exports
- simplestyle-js-plugin-postcss
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (simplestyle-js-plugin-postcss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
simplestyle-js-plugin-postcss 
A simplestyle-js posthook plugin for transforming the CSS generated by simplestyle-js
with PostCSS and PostCSS plugins
Installation
npm install simplestyle-js-plugin-postcss --save
Usage
import { createStyles, registerPostHook } from 'simplestyle-js';
import simplestylePostCSSPlugin from 'simplestyle-js-plugin-postcss';
registerPostHook(simplestylePostCSSPlugin(
[ /* Array of PostCSS plugins, like autoprefixer, cssnano, etc */ ],
{ /* postcss process options (optional) */ },
);
const styles = createStyles({
myButton: {
'&:hover': {
backgroundColor: 'red',
},
'&:active, &:focus': {
borderColor: 'blue',
},
backgroundColor: 'black',
border: '1px solid',
boxSizing: 'border-box',
color: 'white',
},
});
const btn = document.createElement('button');
btn.classList.add(styles.myButton); // button will have styles that were transformed with PostCSS
document.body.appendChild(btn);