Skip to content

rtsao/epistyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epistyle

build status dependencies status npm version

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"

About

💄 Enhanced inline style objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published