$ cnpm install jss-template
Make sure you read how to use plugins in general.
This plugin allows you to use string templates to declare CSS rules. It implements a very naive but very fast (~42000 ops/sec) runtime CSS parser, with certain limitations:
const styles = {
button: `
border-radius: 3px;
background-color: green;
color: red;
margin: 20px 40px;
padding: 10px;
`,
'@media print': {
button: `color: black`
},
'@keyframes id': {
from: `opacity: 0`,
to: `opacity: 1`
}
}
File a bug against cssinjs/jss prefixed with [jss-template].
npm i
npm run test
MIT
Copyright 2013 - present © cnpmjs.org | Home |