csstag-base
Version:
Style html easy
44 lines (32 loc) • 605 B
Markdown
```sh
$ npm install csstag-base babel-plugin-transform-csstag
```
**.babelrc**
```json
{
"plugins": ["babel-plugin-transform-csstag"]
}
```
```js
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' } } }
```