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

border-radius is not work for Image #10

Closed
pinqy520 opened this issue Jun 13, 2017 · 2 comments
Closed

border-radius is not work for Image #10

pinqy520 opened this issue Jun 13, 2017 · 2 comments

Comments

@pinqy520
Copy link
Contributor

um.. i'm not sure it is a cssta's issue.

for some reason (facebook/react-native#14148) Image component is not support corner-specific border radius like borderTopRightRadius. but cssta translates border-radius to four specific border radius, and it is not work for Image Component.


code:

const ImageRadius = cssta(Image) `
  width: 100px;
  height: 100px;
  border-radius: 50px;
  overflow: hidden;
`;


export default () => (
    <ImageRadius
        style={{ borderRadius: 10 }}
        source={{ uri: 'http://img1.skqkw.cn:888/2014/11/17/10/3u1qorvdoud-126128.jpg' }}
        resizeMode="cover" />
);

image

@jacobp100
Copy link
Owner

You are 100% correct in the cause! We "fixed" this in styled-components by disabling the border-radius shorthand. It actually works in android, and it looks like they're working on it for iOS, so I think I'll just wait and see!

I don't really have a great workaround in the meantime. Sorry!

@pinqy520
Copy link
Contributor Author

ok, thanks for your great work~!

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

No branches or pull requests

2 participants