csstag-base
v0.0.11
Published
Style html easy
Downloads
2
Readme
csstag-base
Installation
$ npm install csstag-base babel-plugin-transform-csstag
Set up babel
.babelrc
{
"plugins": ["babel-plugin-transform-csstag"]
}
Example
const {css} = require('csstag-base');
const position = 'absolute';
const testSheet = css`
.test-node {
display: flex;
background-position: ${position};
&:hover {
text-decoration: underline;
}
}
`;
// output
// { '.test-node':
// { display: 'flex',
// 'background-position': 'absolute',
// '&:hover': { 'text-decoration': 'underline' } } }