css-to-react-native: borderRadius property regression?
I had opened up an issue over on styled-components
here about the borderRadius
property on native.
It seems going from version 1.0.11
to 1.1.1
in styled-components
regressed how borderRadius
would work.
borderTopLeftRadius
etc. seemingly have no effect when developing for native from what I can tell in the simulator and what works is simply using borderRadius
.
After having a dive into the source, I think this just requires a slight change to the grammar file to only output borderRadius
.
I’ll submit a PR for this.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 23 (17 by maintainers)
I’m thinking, special casing is going to be hard:
Maybe we need to turn off this shorthand for the time being. @mxstbr
I’m not able to reproduce this on 0.38. You are correct in how
border-radius
splats intoborter-{top,bottom}-{left,right}-radius
, but that does seem to work.I don’t think it can be fixed here can it? I think this is potentially a
react-native
issue.borderTopLeftRadius
etc. work differently withImage
to how they do withView
, as in they don’t 😂It would be a nice to have for now if only supplying one value, it only output
borderRadius
though 😎border-radius: 10
->borderRadius: 10
border-radius: 10 20
->borderTopLeftRadius: 10, borderTopRightRadius: 20, etc.
Of course, if multiple props are supplied you can’t really give a single value for
borderRadius
.@jh3y