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

Add support for SVG clip-path attribute #2030

Closed
wants to merge 2 commits into from

Conversation

kraf
Copy link

@kraf kraf commented Aug 12, 2014

Added support for SVG clip-path attribute, ad #1657

See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-path for details

@zpao zpao added the SVG label Sep 2, 2014
@ghost23
Copy link

ghost23 commented Feb 17, 2015

Wouldn't it make sense to also support the clipPath svg element then?!

@btholt
Copy link
Contributor

btholt commented Mar 4, 2015

This is a simple change that would be very beneficial to us at reddit right now. Any chance this can get merged? :)

@sebmarkbage
Copy link
Collaborator

@ghost23 You can already do React.createElement('clipPath') or <clipPath />, right?

@sebmarkbage
Copy link
Collaborator

We'll bring this in but it didn't make the cut for 0.13. Note that any new attribute is a potentially breaking change.

var Component = React.createClass({
  return <div {...this.props}><span>Clip: {this.props.clipPath}</span></div>;
});

This is currently ignored but will now start transferring to the DOM. It is probably safe to assume that the DOM ignores it but in the case of nested SVG children it might not.

We're working on getting rid of the whitelist completely. Step one is #3104

@ghost23
Copy link

ghost23 commented Mar 5, 2015

@sebmarkbage Hi. Well, React.createElement('clipPath') works, but it is not supported in jsx. The docs also do not mention clipPath as a supported svg element.

@sebmarkbage
Copy link
Collaborator

I believe it should be support in JSX in 0.13 RC2.

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

Successfully merging this pull request may close these issues.

6 participants