@jackhuynh1995/tailwindcss-object-fit

1.0.1 • Public • Published

Object-fit - TailwindCSS Plugin

This plugin generates classes for object-fit image properties.

Installation

Pull it in through npm or yarn:

npm install @jackhuynh1995/tailwindcss-object-fit

Usage

Just add it to the plugins array of your Tailwind config.

plugins: [
  // Other plugins
  require('tailwindcss-object-fit')(['responsive']),
],

By default the plugin generates the following classes:

.object-contain: { objectFit: 'contain' }
.object-cover: { objectFit: 'cover' }
.object-fill: { objectFit: 'fill' }
.object-none: { objectFit: 'none' }
.object-scale: { objectFit: 'scale-down' }

License

This project is licensed under the MIT License.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @jackhuynh1995/tailwindcss-object-fit

      Weekly Downloads

      0

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      2.97 kB

      Total Files

      4

      Last publish

      Collaborators

      • jackhuynh95