react-native-css-modules icon indicating copy to clipboard operation
react-native-css-modules copied to clipboard

String borderRadius cannot be cast to double (andriod only)

Open tychovbh opened this issue 3 years ago • 3 comments

When we use css style for border radius, we are having an error on only android devices. IOS works fine!

CSS:

.input { border-radius: 4px; }

The error makes sense since react stylesheet borderRadius only excepts a double: borderRadius: 4.

But the sass complier should take care of this right?

Our setup: https://github.com/kristerkari/react-native-css-modules/blob/master/docs/setup-sass.md We run a clean installation, so newest version of everything (expo).

See screenshot for full android error:

WhatsApp Image 2022-04-19 at 9 55 54 AM

tychovbh avatar Apr 19 '22 08:04 tychovbh

@kristerkari - my team is also experiencing this issue on Android. Any word on fixing this (or if we should be doing something different). Our code is similar to @tychovbh 's

mkendall-goodyear avatar Nov 30 '22 21:11 mkendall-goodyear

@mkendall-goodyear on which element are you using the border-radius property? Could you please give an example of the styles and the JSX part?

kristerkari avatar Dec 01 '22 10:12 kristerkari

@kristerkari I'm also having this issue on android. It pops up on any jsx element whenever you use border-radius with a pixel or percentage unit in sass.

inafi avatar Jul 05 '23 17:07 inafi