add-px-to-style
Will add px to the end of style values which are Numbers
Last updated 11 years ago by mikkoh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install add-px-to-style 
SYNC missed versions from official npm registry.

add-px-to-style

experimental

Will add px to the end of style values which are Numbers. The following style properties will not have px added.

  • animationIterationCount
  • boxFlex
  • boxFlexGroup
  • boxOrdinalGroup
  • columnCount
  • fillOpacity
  • flex
  • flexGrow
  • flexPositive
  • flexShrink
  • flexNegative
  • flexOrder
  • gridRow
  • gridColumn
  • fontWeight
  • lineClamp
  • lineHeight
  • opacity
  • order
  • orphans
  • stopOpacity
  • strokeDashoffset
  • strokeOpacity
  • strokeWidth
  • tabSize
  • widows
  • zIndex
  • zoom

Usage

var addPxToStyle = require('add-px-to-style');

addPxToStyle('top', 22); // '22px'
addPxToStyle('zIndex', 3); // 3

NPM

License

MIT, see LICENSE.md for details.

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

1 Versions

  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 5
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (0)
None
Dev Dependencies (1)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE