# postcss-object-fit-images

> PostCSS plugin that updates the standard object-fit tag to work with the object-fit-images polyfill for browsers that do not natively support object-fit.

Latest version **1.1.2** (published 2016-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-object-fit-images
pnpm add postcss-object-fit-images
yarn add postcss-object-fit-images
bun add postcss-object-fit-images
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2016-05-07 |
| First published | 2016-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Michael Shick |
| Maintainers | mshick |
| Keywords | postcss, css, postcss-plugin, object-fit, object-fit-images, polyfill |

## Links

- npm: https://www.npmjs.com/package/postcss-object-fit-images
- Repository: https://github.com/mshick/postcss-object-fit-images
- Issues: https://github.com/mshick/postcss-object-fit-images/issues
- npm.io page: https://npm.io/package/postcss-object-fit-images

## Dependencies (3)

- [quote](https://npm.io/package/quote.md) ^0.4.0
- [postcss](https://npm.io/package/postcss.md) ^5.0.16
- [parse-css-font](https://npm.io/package/parse-css-font.md) ^2.0.2

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2016-05-07
- 1.1.0 — 2016-04-26
- 1.0.0 — 2016-04-25

## README

# PostCSS Object Fit Images [![Build Status][ci-img]][ci]

[PostCSS] plugin that updates the standard object-fit tag to work with the object-fit-images polyfill for browsers that do not natively support object-fit..

[PostCSS]: https://github.com/postcss/postcss
[ci-img]:  https://travis-ci.org/ronik-design/postcss-object-fit-images.svg
[ci]:      https://travis-ci.org/ronik-design/postcss-object-fit-images

For use with [object-fit-images](https://github.com/bfred-it/object-fit-images)

```css
.foo {
    object-fit: cover;
    object-position: top;
}
```

Compiles to:

```css
.foo {
    font-family: "object-fit: cover; object-position: top";
    object-fit: cover;
    object-position: top;
}
```

## Existing `font` and `font-family`

Existing `font` and `font-family` declarations are kept and [object-fit-images](https://github.com/bfred-it/object-fit-images) will still work:

```css
.foo {
    object-fit: cover;
    object-position: top;
    font-family: "Helvetica Neue";
}

/* Compiles to: */

.foo {
    object-fit: cover;
    object-position: top;
    font-family: "object-fit:cover;object-position:top", "Helvetica Neue";
}
```

```css
.foo {
    object-fit: cover;
    object-position: top;
    font: strong 1em/1.4 "Helvetica Neue";
}

/* Compiles to: */

.foo {
    object-fit: cover;
    object-position: top;
    font: strong 1em/1.4 "Helvetica Neue";
    font-family: "object-fit:cover;object-position:top", "Helvetica Neue";
}
```

## Usage

```js
postcss([ require('postcss-object-fit-images') ])
```

See [PostCSS] docs for examples for your environment.

## Contributors

* [Michael Shick](https://www.github.com/mshick)
* [Federico Brigante](https://www.github.com/bfred-it)

---
_Source: https://npm.io/package/postcss-object-fit-images · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
