Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yuanchuan/postcss-polygon-shapes

Generate shapes using polygon()
https://github.com/yuanchuan/postcss-polygon-shapes

Last synced: about 1 month ago
JSON representation

Generate shapes using polygon()

Awesome Lists containing this project

README

        

# PostCSS Polygon Shapes

[PostCSS] plugin to generate shapes using `polygon()`.
Ported from [css-doodle].



![shapes screenshot](shapes.png)

```css
.foo {
clip-path: shape(cross);
}
```

```css
.foo {
clip-path: polygon(
5% 35%, 35% 35%, 35% 5%, 65% 5%,
65% 35%, 95% 35%, 95% 65%, 65% 65%,
65% 95%, 35% 95%, 35% 65%, 5% 65%
);
}
```

## Usage

```js
postcss([ require('postcss-polygon-shapes') ])
```

or

```js
postcss([
require('postcss-polygon-shapes', {
shapes: {
myshape: 'polygon(...)'
}
})
])
```

See [PostCSS] docs for examples for your environment.

[PostCSS]: https://github.com/postcss/postcss
[css-doodle]: https://yuanchuan.github.io/css-doodle/