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

Problem with masks #661

Open
pballada opened this issue Dec 2, 2019 · 3 comments
Open

Problem with masks #661

pballada opened this issue Dec 2, 2019 · 3 comments

Comments

@pballada
Copy link

pballada commented Dec 2, 2019

Hi,
I'm having problems with SVG that contains masks. I thought they were supported. :|

Here is the SVG code, that is causing the issues. Could someone give me a hint how to fix it, or what is causing the problem?

Thanks!

<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"> <g opacity="0.4"> <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="20" height="20"> <path d="M19 17H21V15H19V17ZM20 28C15.59 28 12 24.41 12 20C12 15.59 15.59 12 20 12C24.41 12 28 15.59 28 20C28 24.41 24.41 28 20 28ZM20 10C18.6868 10 17.3864 10.2587 16.1732 10.7612C14.9599 11.2638 13.8575 12.0003 12.9289 12.9289C11.0536 14.8043 10 17.3478 10 20C10 22.6522 11.0536 25.1957 12.9289 27.0711C13.8575 27.9997 14.9599 28.7362 16.1732 29.2388C17.3864 29.7413 18.6868 30 20 30C22.6522 30 25.1957 28.9464 27.0711 27.0711C28.9464 25.1957 30 22.6522 30 20C30 18.6868 29.7413 17.3864 29.2388 16.1732C28.7362 14.9599 27.9997 13.8575 27.0711 12.9289C26.1425 12.0003 25.0401 11.2638 23.8268 10.7612C22.6136 10.2587 21.3132 10 20 10ZM19 25H21V19H19V25Z" fill="#9E9E9E"/> </mask> <g mask="url(#mask0)"> <rect width="40" height="40" fill="#757575"/> </g> </g> </svg>

@adamgit
Copy link
Contributor

adamgit commented Dec 2, 2019 via email

@pballada
Copy link
Author

pballada commented Dec 3, 2019

Thanks for the tips!
Will investigate.

@pballada
Copy link
Author

pballada commented Dec 3, 2019

As I understood from the code there's no support for "mask" tag yet, but there is for "clipPath".

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