Creating Flower Shapes using πšŒπš•πš’πš™-πš™πšŠπšπš‘: πšœπš‘πšŠπš™πšŽ()

https://frontendmasters.com/blog/creating-flower-shapes-using-clip-path-shape

![](https://m.stacker.news/93908)

**What is `shape()`?**

You are probably familiar with `clip-path: polygon()`, right? A function that allows you to specify different points, draw straight lines between them and create various CSS shapes. β€œStraight lines” because when it comes to curves, clip-path is very limited. We have `circle()` and `ellipse()`, but we cannot achieve complex shapes with them.

`shape()` is the new value that overcomes such limitation. In addition to straight lines, it allows us to draw curves. But If you check the MDN page or the specification, you can see that the syntax is a bit complex and not easy to grasp. It’s very similar to SVG path, which is good as it gives us a lot of options and flexibility, but it requires a lot of practice to get used to it.

https://stacker.news/items/991750

Reply to this note

Please Login to reply.

Discussion

No replies yet.