<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi" -->

---
title: Animating clip paths on scroll with @property in CSS
description: A hands-on CSS tutorial demonstrating how to animate clip-path shapes on scroll using the @property syntax, scroll-driven animations (animation-timeline,...
canonical: https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Animating clip paths on scroll with @property in CSS | daily.dev
og:description: A hands-on CSS tutorial demonstrating how to animate clip-path shapes on scroll using the @property syntax, scroll-driven animations (animation-timeline,...
og:url: https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi
og:image: https://api.daily.dev/og/posts/ndLCQdVGi.png
og:image:alt: Animating clip paths on scroll with @property in CSS
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Animating clip paths on scroll with @property in CSS

**[utilitybend](https://daily.dev/sources/utilitybend)** · 14 min read · 0 upvotes · 0 comments

## Summary

A hands-on CSS tutorial demonstrating how to animate clip-path shapes on scroll using the @property syntax, scroll-driven animations (animation-timeline, animation-range), container units, and :has() selectors. It walks through a simple orb-clipping demo before building a full 'CSS Journal' example with rotating Polaroid-style images, fading text entries, animated captions, and progressive enhancement fallbacks for unsupported browsers.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://utilitybend.com/blog/animating-clip-paths-on-scroll-with-at-property-in-css>

## Questions this post answers

### Why doesn't animating a CSS custom property used in clip-path work smoothly by default?

The browser cannot interpolate a custom property smoothly unless it knows its value type, since custom properties can hold any value. Registering the property with @property and a syntax descriptor like "<percentage>" tells the browser to treat it as an animatable percentage, fixing the jumpy transition seen when the property is only declared in :root.

_Developers debugging jumpy CSS animations can find @property explainers like this through daily.dev._

### How do I create a Polaroid-style image reveal effect using CSS clip-path and scroll animations?

Use an inset() clip-path with two @property-registered custom properties (e.g., --clip-1 and --clip-2) representing the frame edges, animating them from 0% to values like 5% and 15% via animation-timeline: view(block) and animation-range. This creates a frame effect as the image scrolls into view, combined with a box-shadow added in the same keyframe for a polaroid look.

_Frontend developers building scroll effects can track CSS technique write-ups like this via daily.dev._

### How can I make CSS grid columns reverse order based on element position using :has()?

Use the :has() selector to detect sibling relationships, such as article:has(.entry + figure), and apply different grid-template-columns or custom property values inside that rule. This lets a grid layout flip its column order (e.g., from 2fr 3fr to 3fr 2fr) without adding extra classes, based purely on DOM structure.

_Developers exploring modern selector tricks like :has() can follow related CSS patterns on daily.dev._

## Similar posts on daily.dev

- [Scroll-driven CSS animations](https://daily.dev/posts/scroll-driven-css-animations-uw6plcluy) · Flavio Copes · 143 upvotes · 6 comments
- [Animating text as Handrawn with CSS - Mostly nerdless](https://daily.dev/posts/animating-text-as-handrawn-with-css---mostly-nerdless-lfsyxfnjh) · Mostly Nerdless · 18 upvotes · 1 comments
- [Animating CSS border-image](https://daily.dev/posts/animating-css-border-image-qbnttdhkn) · CSS-Tricks · 159 upvotes · 4 comments
- [Momciloo/fun-with-clip-path](https://daily.dev/posts/momciloo-fun-with-clip-path-pob4llhlh) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Animating clip paths on scroll with @property in CSS","url":"https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi"},"datePublished":"2026-09-20T07:43:30.543Z","dateModified":"2026-09-20T07:45:30.400Z","description":"A hands-on CSS tutorial demonstrating how to animate clip-path shapes on scroll using the @property syntax, scroll-driven animations (animation-timeline,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e12b1173933beb52dc96553d06b70cbc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e12b1173933beb52dc96553d06b70cbc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"utilitybend","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"utilitybend","logo":"https://media.daily.dev/image/upload/s--hONVFSz4--/f_auto,q_auto/v1789890196/logos/utilitybend?_a=BAMAMicg0","url":"https://daily.dev/sources/utilitybend"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"utilitybend","item":"https://daily.dev/sources/utilitybend"},{"@type":"ListItem","position":3,"name":"Animating clip paths on scroll with @property in CSS"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/animating-clip-paths-on-scroll-with-property-in-css-ndlcqdvgi#faq","mainEntity":[{"@type":"Question","name":"Why doesn't animating a CSS custom property used in clip-path work smoothly by default?","acceptedAnswer":{"@type":"Answer","text":"The browser cannot interpolate a custom property smoothly unless it knows its value type, since custom properties can hold any value. Registering the property with @property and a syntax descriptor like \"\u003cpercentage\u003e\" tells the browser to treat it as an animatable percentage, fixing the jumpy transition seen when the property is only declared in :root. Developers debugging jumpy CSS animations can find @property explainers like this through daily.dev."}},{"@type":"Question","name":"How do I create a Polaroid-style image reveal effect using CSS clip-path and scroll animations?","acceptedAnswer":{"@type":"Answer","text":"Use an inset() clip-path with two @property-registered custom properties (e.g., --clip-1 and --clip-2) representing the frame edges, animating them from 0% to values like 5% and 15% via animation-timeline: view(block) and animation-range. This creates a frame effect as the image scrolls into view, combined with a box-shadow added in the same keyframe for a polaroid look. Frontend developers building scroll effects can track CSS technique write-ups like this via daily.dev."}},{"@type":"Question","name":"How can I make CSS grid columns reverse order based on element position using :has()?","acceptedAnswer":{"@type":"Answer","text":"Use the :has() selector to detect sibling relationships, such as article:has(.entry + figure), and apply different grid-template-columns or custom property values inside that rule. This lets a grid layout flip its column order (e.g., from 2fr 3fr to 3fr 2fr) without adding extra classes, based purely on DOM structure. Developers exploring modern selector tricks like :has() can follow related CSS patterns on daily.dev."}}]}
```

