What can I do with `clip-path`?
Cut elements into custom shapes like circles, polygons, ellipses, or arbitrary SVG paths. Common uses include angled section dividers, hexagonal avatars, ticket-style cards with notched edges, and reveal animations where the visible area expands over time. `clip-path` is purely visual; the element's layout box stays the same, so adjacent content isn't affected by the clipped shape.
What's the difference between `clip-path` and `mask`?
`clip-path` is a hard-edged binary clip: pixels are either kept or removed. `mask` (or `mask-image`) uses a grayscale or alpha image to create soft, gradient transparency where the mask intensity controls how visible each pixel is. Use clip-path for crisp geometric shapes; use mask for fades, soft edges, and effects driven by an image or gradient pattern.
Can I animate `clip-path`?
Yes, but only between shapes with the same number of points and the same function. A polygon with 4 points can transition to another 4-point polygon, and circle-to-circle works fine, but polygon-to-circle is discrete and snaps. The generator helps by keeping shape vertex counts stable. For complex shape morphing, consider SVG's `<animate>` element or libraries like GSAP's MorphSVG.
Does `clip-path` affect click areas?
By default, the clipped-out area is still clickable because the element's hit-testing uses its layout box. To restrict pointer events to the visible shape, add `pointer-events: none;` on the parent and re-enable it on a child that matches the visible area, or use SVG with a real path for accurate hit-testing. For most decorative clips this isn't needed; for interactive shapes, plan accordingly.
How do I create angled section dividers?
Apply a polygon clip-path to the section: `clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%);` creates a slanted bottom edge. Adjust the corner offsets to set the angle. This eliminates SVG dividers and keeps everything CSS-driven. Make sure the section has enough padding-bottom to compensate for the cut so content doesn't get clipped.
How is browser support for `clip-path`?
Excellent. All modern browsers support `clip-path` with shape functions like `circle()`, `ellipse()`, `polygon()`, and `inset()`. The `path()` function for arbitrary SVG paths works in all current browsers. Older Safari needed the `-webkit-clip-path` prefix; today the unprefixed form works everywhere. For graceful degradation, content stays visible (just unclipped) when the property isn't supported, so no special fallback is required.