buryem
Got style conflicts? Bury 'em!
Based on Barium by Yuanyan Cao.
Features
- Keep Simple: No cascading, No nesting
- No Conflict: Selectors are generated and are unique
- Better CSS Support: Pseudo Classes, Media Queries
- Automatically Add things: Vendor Prefixes, Default "px" unit to numeric values where needed
Installation
npm i buryem --save
Developing
To build locally, run:
npm install --ignore-scripts
npm run build
Usage
import buryem from 'buryem'; const animations = buryem; const styles = buryem; const Example = props <div> <button => Click Me <span ="nah">or nah</span> </button> <style> /* if you need to reach into the children you can do this */ ` . [data-nah="nah"] { color: #f0f; } ` </style> </div>;
Pass an object as a 3rd argument to any of these methods and they will add or append the styles to be injected to it as a __cssText
property.