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

tailwindcss-pxtovw

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

tailwindcss-pxtovw

tailwindcss plugin convert dynamic classess from px to vw

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

tailwincdss px-to-vw

Installation

npm install tailwindcss-pxtovw
//or
yarn add tailwindcss-pxtovw

Tailwind Config

const pxtovw = require('@tailwindcss-pxtovw');

module.exports  =  {
    content:  ["./src/**/*.{html,js}"],
    theme:  {
	    extend:  {},
	  },
	plugins:  [pxtovw({ default: 480, tablet: 768, desktop: 1024 })], // add here a plugin and configuration
  }

Usage

You need add variant "@pv" before class and use arbitrary values

For, example:

<div class="@pv:m-[16px]">Hello World!</div> // convert 16px to vw. divide by 480
<div class="tablet@pv@:m-[16px]">Hello World!</div> // convert 16px to vw. divide by 768
<div class="desktop@pv:m-[16px]">Hello World!</div> // convert 16px to vw. divide by 1024

FAQs

Package last updated on 20 Nov 2022

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