Socket
Book a DemoInstallSign in
Socket

tailwindcss-preset-px-to-rem

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-preset-px-to-rem

A Tailwind CSS preset that automates the conversion of pixel values to rem units. Enhance your responsive design workflow with customizable rem dividers and easy integration into your Tailwind CSS configuration.

1.2.1
latest
Source
npmnpm
Version published
Weekly downloads
105
-14.63%
Maintainers
0
Weekly downloads
 
Created
Source
Tailwind CSS

Tailwind CSS Px To Rem Preset

About

A Tailwind CSS preset that automates the conversion of pixel values to rem units.
Enhance your responsive design workflow with customizable rem dividers and easy integration into your Tailwind CSS configuration.

Installation

npm i tailwindcss-preset-px-to-rem

Usage

// tailwind.config.js
module.exports = {
  presets: [require("tailwindcss-preset-px-to-rem")],
};

As an example, the classes applied below become available right away.
Those classes will convert from px to rem.

<div class="mt-25 p-15 max-w-640">
  <h1 class="text-28">...</h1>
  <p class="text-20">...</p>
  <p class="text-17">...</p>
</div>

Configuration

You can configure some options by using those properties in theme object:

  • remDivider (default - 20)
  • fontSizeLimit (default - 100)
  • spacingLimit (default - 1920)
  • borderRadiusLimit (default - 500)
// tailwind.config.js
theme: {
  remDivider: 20,
  fontSizeLimit: 50,
  spacingLimit: 100,
  borderRadiusLimit: 30
}

Keywords

tailwindcss

FAQs

Package last updated on 23 Jun 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.