jss-px
v1.0.0
Published
JSS plugin that adds default px unit to numeric values where needed
Downloads
218
Readme
JSS plugin that adds default px unit to numeric values where needed
This plugin lets you omit the px
unit from values of style properties.
![Gitter](https://badges.gitter.im/Join Chat.svg)
Usage example
import jss from 'jss'
import px from 'jss-px'
jss.use(px())
let sheet = jss.createStyleSheet({
container: {
'font-size': 20,
'z-index': 1,
'line-height': 1.2
}
})
console.log(sheet.toString())
.jss-0-0 {
font-size: 20px;
z-index: 1;
line-height: 1.2;
}
console.log(sheet.classes)
{ container: "jss-0-0" }
Run tests
npm i
npm run test
License
MIT