kristerkari / react-native-css-modules

Style React Native components using CSS, PostCSS, Sass, Less or Stylus.
MIT License
328 stars 21 forks source link

String borderRadius cannot be cast to double (andriod only) #45

Open tychovbh opened 2 years ago

tychovbh commented 2 years ago

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

mkendall-goodyear commented 1 year ago

@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

kristerkari commented 1 year ago

@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?

inafi commented 1 year ago

@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.