JSPM

tailwindcss-empty

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q48870F
  • License MIT

Tailwind plugin to generate variants for empty elements.

Package Exports

  • tailwindcss-empty

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tailwindcss-empty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tailwindcss-empty

Dead simple Tailwind plugin that adds a variant for the :empty CSS pseudo-class.

Installation

npm i tailwindcss-empty

Usage

In your tailwind.js:

  modules: {
    // The plugin only generates classes when you explicitly
    // register the 'empty' state variant for a module
    display: ['responsive', 'empty'],
    // ...
  },

  plugins: [
    require('tailwindcss-empty')(),
    // ...
  ]

In your HTML:

<!-- This span will be displayed normally. -->
<span class="errors empty:hidden">Whoops!</span>

<!-- This one will be hidden. -->
<span class="errors empty:hidden"></span>