epistyle

Enhanced inline style objects

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
epistyle
1.1.07 years ago8 years agoMinified + gzip package size for epistyle in KB

Readme

epistyle
!build statusbuild-badgebuild-href !dependencies statusdeps-badgedeps-href !npm versionnpm-badgenpm-href
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"