Skip to content

yuanchuan/postcss-polygon-shapes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Generate shapes using polygon()

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published