tailwindcss-hyphens

0.1.0 • Public • Published

tailwindcss-hyphens

A plugin for Tailwind CSS to create utility classes for hyphens.

Requirements

This plugin requires Tailwind CSS v1.x.

Installation

npm install --save-dev tailwindcss-hyphens

or

yarn add --dev tailwindcss-hyphens

Usage

In your tailwind.config.js:

module.exports = {
  // …
  plugins: [
    // …
    require("tailwindcss-hyphens")
    // …
  ]
  // …
};

Utilities

By default, this plugin generates the following utilities:

.hyphens-none {
  hyphens: none;
}
 
.hyphens-manual {
  hyphens: manual;
}
 
.hyphens-auto {
  hyphens: auto;
}

Customization

If you need a utility class for a non-standard value, you can customize this in tailwind.config.js:

module.exports = {
  theme: {
    // …
    hyphens: {
      "foo-bar": "foo-bar"
    }
    // …
  }
  // …
};

This would generate the following utility class:

.hyphens-foo-bar {
  hyphens: foo-bar;
}

License

MIT

Package Sidebar

Install

npm i tailwindcss-hyphens

Weekly Downloads

2,753

Version

0.1.0

License

MIT

Unpacked Size

2.24 kB

Total Files

3

Last publish

Collaborators

  • philippbosch