Jump to content
Search Community

GSAP unable to animate clip-path: polygon with calc percent + px units

bradwoods.io test
Moderator Tag

Recommended Posts

  • bradwoods.io changed the title to GSAP unable to animate clip-path: polygon with calc percent + px units

That's because your starting and ending strings have different amounts of numbers and are formatted differently, thus the complex string animation can't function the way you expected. 

 

There are two pretty easy solutions: 

 

1) Just make sure the start/end strings have matching formatting and quantity of numbers: 

See the Pen OJGgXRQ?editors=0010 by GreenSock (@GreenSock) on CodePen

 

2) Use a CSS variable to simplify things: 

See the Pen GRLEqNO by GreenSock (@GreenSock) on CodePen

 

Does that clear things up? 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...