Open cdoublev opened 1 year ago
Both use similar syntax but point to resources of different types, and these are mentioned in the spec.
<mask-source>
is a reference to a mask svg element, which is not necessarily a valid image source, and vice versa.
I cannot find the issue/PR but I think this was already explained to me, sorry.
But you cannot know at parse time which of <mask-source>
or <image>
the resource is matching, isn't it?
I understand the usefulness of <mask-source>
to differentiate them in other sections of the specification. But from the perspective of parsing, there is none and it is a bit problematic for a grammar-driven implementation: one of the two types will never get a match.
Would it be acceptable to define the two appropriate terms without using the syntax?
https://drafts.fxtf.org/css-masking-1/#typedef-mask-reference
https://drafts.csswg.org/css-images-4/#typedef-image
I may be missing something because I think
<url>
was already produced by<image>
at the time<mask-source>
was defined.