Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Animating SVG with CSS Keyframe and Line Drawing Animations Animating stroke-dasharray and stroke-dashoffset

Alex Oates
Alex Oates
7,171 Points

Line animation fill won't work with safari?

I've managed to get it all working in Chrome, but Safari doesn't render the fill, the actual line animation is working, but when it gets to the fill at the end it just defaults to #000. I've looked through web inspector and can't see anything causing this under computed rules.

Please help!

Julie Myers
Julie Myers
7,627 Points

Could you post both your html and css coding?

Alex Oates
Alex Oates
7,171 Points

EDIT:

SO i've found its the <a></a> tag wrapped around the SVG causing the issue. But can't find anything in my CSS that would cause the fill to change solid #000.

Alex Oates
Alex Oates
7,171 Points

Ok, i've figured it out. I had to wrap the SVG's path in anchor tags, not the SVG. Now all works as expected.

Though if someone could explain why this happens i'd really appreciate it!