Invalid DOM property `fill-rule`. Did you mean `fillRule`?

Hello,

I get this error message and when I change fill-rule to fillRule it doesn’t work I still have the error message.

Do you have any idea ?

Thank you for your help

My code

<svg
       width="112"
       height="24"
       viewBox="0 0 112 24"
       xmlns="http://www.w3.org/2000/svg">
       <path
            fillRule="evenodd"
            clipRule="evenodd"

I suggest you refer to documentantion on fill-rule and clip-rule:

Note clip-rule is only used with <clipPath> elements.

1 Like

for those that are confused like me: The user is doing this in a React environment. React wants you to have camelCase forms of attributes, instead of the HTML standard (“kebab-case”). (Side note: TIL that’s called kebab-case.)

2 Likes

Thank you for your answers and in my code what exactly should I do?

What are to trying to do?

Do you still get an error when you delete the clipRule?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.