0.1.1 • Published 7 years ago

postcss-polygon-shapes v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

PostCSS Polygon Shapes

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

shapes screenshot

.foo {
  clip-path: shape(cross);
}
.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

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

or

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

See PostCSS docs for examples for your environment.