1.0.1 • Published 6 years ago

tailwindcss-object-fit v1.0.1

Weekly downloads
139
License
MIT
Repository
github
Last release
6 years ago

Object-fit - TailwindCSS Plugin

This plugin generates classes for object-fit image properties.

Installation

Pull it in through npm or yarn:

npm install tailwindcss-object-fit
yarn add 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.