thabti / react-native-css

Style React-Native components with css
MIT License
769 stars 66 forks source link

Can't generate shadowOffset #38

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi !

Thank you for creating this package.

I tried to generate shadowOffset, but it look like it was not supported by this package. https://facebook.github.io/react-native/docs/shadow-props.html

cardContainer {
  flex: 1;
  background-color: #fff;
  margin-top: 5;
  padding: 8;
  border-top-width: 0.5;
  border-top-color: #fafafa;
  border-bottom-width: 0.5;
  border-bottom-color: #666;
  shadow-offset: { width: 1; height: 1;}
}
thabti commented 8 years ago

@lamnn1807 Awesome, thank you for raising this issue. I would love for you to contribute this fix. Else I will have a look at adding a fix this weekend.

alexmick commented 8 years ago

I might be wrong but I'm not sure this will parse as valid css or scss as a matter of fact. Moreover, this plugin was initially designed to fill the style property of react native elements whereas the shadowOffset is a completely different property :

<View style={styles.container} shadowOffset={{ width: 1, height: 1}} />

So it might be confusing if react-native-css did that because passing a shadow-offset in the style prop won't do it...

thabti commented 8 years ago

@alexmick awesome reply.

thabti commented 8 years ago

@lamnn1807 I will be closing this. This is out of scope of the library.