preactjs / preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
http://npm.im/preact-compat
MIT License
950 stars 148 forks source link

SVG `clipPath` properties should be rendered as `clip-path` attributes in the DOM. #538

Closed steveharrison closed 4 years ago

steveharrison commented 4 years ago

Steps to reproduce

Navigate to https://codesandbox.io/s/fervent-visvesvaraya-wz8sw and inspect the DOM of the SVG rendered in Preact (note that this is not a valid SVG: I've stripped out most of the elements to just focus on this problem).

Expected Behaviour

<g clipPath /> should become <g clip-path />.

Actual Behaviour

<g clipPath /> remains <g clipPath />.

React Behaviour

In React 16.12.0, <g clipPath /> becomes <g clip-path />.

This is also not an issue in Preact 10.2.1, so it has been introduced since then.

qpwo commented 2 years ago

I just encountered this error again