JSPM

@jackhuynh1995/tailwindcss-object-fit

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q21002F
  • License MIT

Generate utility classes for object-fit properties

Package Exports

  • @jackhuynh1995/tailwindcss-object-fit
  • @jackhuynh1995/tailwindcss-object-fit/index.js

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 (@jackhuynh1995/tailwindcss-object-fit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.