🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

add-px-to-style

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-px-to-style

Will add px to the end of style values which are Numbers

1.0.0
latest
Source
npm
Version published
Weekly downloads
315K
10.14%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

css,px,style,pixel,value

FAQs

Package last updated on 30 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts