Skip to content

Fix border properties on Image component #15

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

Closed
wants to merge 1 commit into from

Conversation

brunolemos
Copy link
Member

For some reason, if we transform some border properties, it doesn't work on Image. But if we don't transform, it still works everywhere.

const AvatarImage = styled.Image`
  width: ${({ size }) => size};
  height: ${({ size }) => size};
  background-color: black;
  border-radius: 4;
  border-color: red;
  border-width: 5;
`;
const AvatarView = styled.View`
  width: ${({ size }) => size};
  height: ${({ size }) => size};
  background-color: black;
  border-radius: 4;
  border-color: red;
  border-width: 5;
`;

For some reason, if we transform `borderRadius`, it doesn't work on `Image`. But if we don't transform, it still works everywhere.

```
const AvatarImage = styled.Image`
  width: ${({ size }) => size};
  height: ${({ size }) => size};
  background-color: black;
  border-radius: 4;
`;
```

```
const AvatarView = styled.View`
  width: ${({ size }) => size};
  height: ${({ size }) => size};
  background-color: black;
  border-radius: 4;
`;
```
@jacobp100
Copy link
Contributor

Hi! I've actually been putting the workarounds here! At some point, I'm going to try and fix the behaviour in RN.

@jacobp100
Copy link
Contributor

Although thinking about it, maybe we could add property blacklisting to the API here for when we do need to work around these things.

@jacobp100
Copy link
Contributor

jacobp100 commented Nov 25, 2016

See #16. But thanks anyway!

@jacobp100 jacobp100 closed this Nov 25, 2016
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

Successfully merging this pull request may close these issues.

2 participants