epistyle
v1.1.0
Published
Enhanced inline style objects
Downloads
5
Readme
epistyle
Enhanced inline style objects
Adds support for media queries, psuedo classes, and fallback values via generation of scoped CSS.
Usage
const epistyle = require('epistyle/passthrough');
const {passthrough, css, className} = epistyle({
color: 'red',
':hover': {
color: ['rgba(0,75,255,0.8)', 'blue']
}
});
console.log(passthrough);
// => {color: "red"}
console.log(css);
// => "._style_2wKC1:hover {\n color: blue !important;\n color: rgba(0,75,255,0.8) !important\n}"
console.log(className);
// => "_style_2wKC1"