Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

clipPathUnits is being renamed to kebab-case version which breaks functionality #122

Description

@vitaliyrtest1

Hello!

When using clipPathUnits attribute in svgs, svg-react-loader renames this attribute to kebab version clip-path-units, which actually breaks functionality of this attribute.

I've been testing this for hours until found the bug :(

Right now I'm loading this SVG as text and insert as it is, but I guess it will be good to fix this bug.

Example svg:

<svg>
  <defs>
    <clipPath id="header-background-path" clipPathUnits="objectBoundingBox" transform="scale(0.002777778, 0.005747126)">
      <path d="M0,0 L360,0 L360,124 C311.942708,144 254.8125,154 188.609375,154 C122.40625,154 59.5364583,160.666667 0,174 L0,0 Z" />
    </clipPath>
  </defs>
</svg>

Expected result - as it is.

Actual result:

...
<clipPath id="header-background-path" clip-pathunits="objectBoundingBox" transform="scale(0.002777778, 0.005747126)">
...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions