Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
If a <mask> is defined inside a <defs> it seems we never actually parse it, because the visitDefsNodeStart() function returns false for both generators.
This is because for the typical case, we only care about the contents of defs when it is used. However, a <mask> defined inside the subtree should still be accessible for masking other items. This seems like a weird corner case, but it's actually done in an example in the SVG docs: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Clipping_and_masking#masking
So maybe it's considered good practice to collect those types of things inside a defs branch.