Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-px2vw

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-px2vw

A rollup plugin used to transform px to vw in stylesheets

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

rollup-plugin-px2vw

Arollup plugin, transform px to vw in stylesheets.

Install

npm install rollup-plugin-px2vw

Options

  • Include: RegExp
    A regular expression that matches the file to be transformed
  • Exclude: RegExp
    A regular expression that matches the file not to be transformed
  • ViewportWidth: Number
    Set standard viewportWidth, The size computed based on the standard viewportWidth.
  • Decimal: Number
    Set the precision of the transform.

Examples

// rollu.config.js
import px2vw from 'rollup-plugin-px2vw'
export default {
  ....
  plugins: [
    px2vw({
      include: /.css$|\.s[ac]ss$|\.vue$/,   // Files need to transform
      exclude: /node_modules/,   // Files don't need to transform
      viewportWidth: 750, // Set standard viewport width to 750px.  1vw = 7.5px
    })
  ]
}

FAQs

Package last updated on 06 May 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc