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

error Unknown property 'mask-type' found react/no-unknown-property #3466

Open
JustFly1984 opened this issue Oct 18, 2022 · 4 comments
Open

Comments

@JustFly1984
Copy link

The property in question is on svg element, so may be add it to allowed list?

@ljharb
Copy link
Member

ljharb commented Oct 18, 2022

Can you share the jsx for this? I see mask on MDN, and mask-type CSS, but not a mask-type attribute.

I do see gregberge/svgr#336 which suggests it might apply to <mask> elements though?

@sandgraham
Copy link

Just chiming in- saw this error pop up on some inline SVG like so:

<mask
  mask-type="alpha"
  maskUnits="userSpaceOnUse"
  x="100"
  y="150"
  width="100"
  height="150"
>
  <path d="..." />
</mask>

Note, changing the property to maskType also reveals that it isn't a type on lib.dom SVGMaskElement yet.

The draft spec defines it as applying to mask elements and, notably, as a "presentation attribute", which, from what I can tell in the SVG 1.1 spec, should be assignable as an inline attribute.

...there is a corresponding XML attribute (the presentation attribute) with the same name that is available on all relevant SVG elements

@ljharb
Copy link
Member

ljharb commented Nov 16, 2022

That "corresponding" stuff is very, very confusing. It'd be great to get confirmation from someone who works on the SVG specs.

@sandgraham
Copy link

I filed an issue with W3C to try and get some clarification: w3c/fxtf-drafts#480. Let me know if I missed something!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants