# postcss-clip-path-polyfill

> Generates SVG fallback for clip-path properties to make it works in Firefox

Latest version **1.1.0** (published 2020-09-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install postcss-clip-path-polyfill
pnpm add postcss-clip-path-polyfill
yarn add postcss-clip-path-polyfill
bun add postcss-clip-path-polyfill
```

## 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.0 |
| Published | 2020-09-18 |
| First published | 2016-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Anton Nesterov |
| Maintainers | anton.nesterov |
| Keywords | clip-path, css, postcss, postcss-plugin, polyfill |

## Links

- npm: https://www.npmjs.com/package/postcss-clip-path-polyfill
- Repository: https://github.com/komachi/postcss-clip-path-polyfill
- Homepage: https://github.com/komachi/postcss-clip-path-polyfill#readme
- Issues: https://github.com/komachi/postcss-clip-path-polyfill/issues
- npm.io page: https://npm.io/package/postcss-clip-path-polyfill

## 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.0 (latest) — 2020-09-18
- 1.0.4 — 2016-08-18
- 1.0.3 — 2016-08-01
- 1.0.2 — 2016-08-01
- 1.0.1 — 2016-08-01
- 1.0.0 — 2016-08-01

## README

# postcss-clip-path-polyfill

>PostCSS plugin which add SVG hack for clip-path property to make it work in Firefox. Currently supports only `polygon()`.


```css
/* Input */
.test1 {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
```

```css
/* Output */
.test1 {
  clip-path: url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3CclipPath id="p" clipPathUnits="objectBoundingBox"%3E%3Cpolygon points="0.5 0, 0 1, 1 1" /%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E#p');
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
```

 It doesn't add vendor prefixes so you should use it with [autoprefixer](https://github.com/postcss/autoprefixer).

## Installation

```
npm i postcss-clip-path-polyfill --save-dev
```

## Usage

Check out [PostCSS documentation](https://github.com/postcss/postcss#usage) on how to use PostCSS plugins.

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