Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bakerkretzmar/tailwindcss-empty

Tailwind plugin to generate variants for empty elements.
https://github.com/bakerkretzmar/tailwindcss-empty

css tailwind tailwindcss tailwindcss-plugin

Last synced: 2 months ago
JSON representation

Tailwind plugin to generate variants for empty elements.

Awesome Lists containing this project

README

        

tailwindcss-empty
=================

[![tailwindcss-empty](https://img.shields.io/npm/v/tailwindcss-empty.svg?style=flat)](https://www.npmjs.com/package/tailwindcss-empty)

Dead simple Tailwind plugin that adds a variant for the [`:empty`](https://developer.mozilla.org/en-US/docs/Web/CSS/:empty) CSS pseudo-class.

Installation
------------

```bash
npm i tailwindcss-empty
```

Usage
-----

In your `tailwind.js`:

```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:

```html

Whoops!


```