New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tailwind-bicolor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwind-bicolor

Auto handle tailwind dark color

0.0.3
latest
Source
npm
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

tailwind-bicolor

Auto handle tailwind dark color.

<div class="bg-white dark:bg-black"></div>
<!-- Replace with below ↓↓↓ -->
<div class="bi:bg-white"></div>

Tested in tailwind 3.x only.

Features

  • bg-white to bg-black
  • bg-slate-50 to bg-slate-900
  • bg-slate-100 to bg-slate-800
  • bg-slate-200 to bg-slate-700
  • bg-slate-300/40 to bg-slate-600/40
  • and so on...

For example:

<div class="bi:bg-green-400"></div>

will generate:

.bi\:bg-green-400 {
  --tw-bg-opacity: 1;
  /* green-400 */
  background-color: rgb(74 222 128 / var(--tw-bg-opacity));
}
.dark .bi\:bg-green-400 {
  /* green-500 */
  background-color: rgb(34 197 94 / var(--tw-bg-opacity));
}

Usage

// tailwind.config.js
const { bicolor } = require('tailwind-bicolor');

module.exports = {
  // ...
  plugins: [bicolor()],
};

prefix support list:

  • bg (background-color)
  • text (color)
  • decoration (text-decoration-color)
  • border (border-color)
  • border-x, border-y, border-t, border-r, border-b, border-l
  • outline (outline-color)
  • accent (accent-color)
  • caret (caret-color)
  • fill
  • stroke
  • shadow
  • ring, ring-offset
  • divide

Keywords

tailwind

FAQs

Package last updated on 14 Dec 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