jss-px

1.0.0 • Public • Published

JSS logo

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.

Demo - JSS

![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

Readme

Keywords

Package Sidebar

Install

npm i jss-px

Weekly Downloads

205

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kof