Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill url for svgs needs location href to display properly when using a base tag #1320

Closed
francesca-cicileo opened this issue Oct 23, 2018 · 3 comments

Comments

@francesca-cicileo
Copy link

Browser: Safari v12 on MacOS High Sierra.

I have a website that uses a base tag, and I'm using Lottie to animate SVGs that have linear gradients. These linear gradients are defined in the <defs> tag of the SVG and used in the SVG with fill=url(#linear_gradient_id).

In Safari, the animated SVGs created by Lottie come out black because the base tag is causing the url() to fetch the wrong path. I found the function lottie.setLocationHref(locationHref), which properly sets the location for the url() for mask elements in the SVG; however, the location is not set for the url()s used to define fills. Would it be possible to add the locationHref to the fill urls here and here in the SVGGradientFillStyleData file?

This may be an extension of this issue: airbnb/lottie-web#360

@francesca-cicileo
Copy link
Author

Wondering why this was closed?

@bodymovin
Copy link
Collaborator

Hi, sorry I didn't answer the message yet.
I've fixed it in that commit and it automatically closes it
It will be available in the next deploy.

@francesca-cicileo
Copy link
Author

Great, thank you!

dreamoftrees pushed a commit to immutable/lottie-web-threejs that referenced this issue Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants