Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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()
- Host: GitHub
- URL: https://github.com/yuanchuan/postcss-polygon-shapes
- Owner: yuanchuan
- License: mit
- Created: 2017-05-30T05:14:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T01:51:43.000Z (over 7 years ago)
- Last Synced: 2024-11-09T07:42:08.216Z (about 2 months ago)
- Language: JavaScript
- Size: 85.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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/