Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Masking dashed lines - Mask stroke position is off

Recommended Posts



I'm trying to reveal a dashed line with drawsvg using a mask but the mask position seems to be off. 

I can increase the stroke-width for lines that don't overlap but when they do overlap in the codepen example, I need a more precise line. 


Anybody encounter this and know whats up? 


See the Pen wWMQjW by phantomboogie (@phantomboogie) on CodePen

Link to comment
Share on other sites

That's happening because of the transform of the path inside the mask. The mask hasn't moved, but the path inside it has. Simply remove that transform and you'll be all good to go.


See the Pen JKGezz by PointC (@PointC) on CodePen


Happy tweening.


  • Like 2
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.